Skip to content

Commit

Permalink
Merge pull request #4699 from 9rnsr/fix14552
Browse files Browse the repository at this point in the history
[REG2.066] Issue 14552 - SIGSEGV with compile construction nested class in predicate
  • Loading branch information
WalterBright committed Jun 1, 2015
2 parents 3f40636 + 2ad3752 commit c4bcacc
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions test/runnable/xtest46.d
Original file line number Diff line number Diff line change
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 c4bcacc

Please sign in to comment.