Skip to content

Commit

Permalink
fix Issue 14552 - SIGSEGV with compile construction nested class in p…
Browse files Browse the repository at this point in the history
…redicate

Just adding a test case so the SEGV problem was already fixed in the PR #4464.
  • Loading branch information
9rnsr committed May 31, 2015
1 parent 26ebfeb commit 2ad3752
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions test/runnable/xtest46.d
Expand Up @@ -7398,6 +7398,40 @@ void test14211()
c.func(); // called without vtbl access
}

/***************************************************/
// 14552

template map14552(fun...)
{
template AppliedReturnType(alias f)
{
alias typeof(f(0)) AppliedReturnType;
}

auto map14552(int[] r)
{
assert(!is(AppliedReturnType!fun));
return MapResult14552!fun();
}
}

struct MapResult14552(alias fun)
{
@property front()
{
fun(0);
}
}

class Outer14552
{
auto test()
{
[1].map14552!(j => new Inner);
}
class Inner {}
}

/***************************************************/

int main()
Expand Down

0 comments on commit 2ad3752

Please sign in to comment.