Skip to content

Commit

Permalink
fix Issue 10928 - Fails to create closures that reference structs wit…
Browse files Browse the repository at this point in the history
…h dtor
  • Loading branch information
9rnsr committed Aug 10, 2014
1 parent 46c3121 commit 4b9df68
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/runnable/funclit.d
Expand Up @@ -1018,6 +1018,30 @@ void test10336()
assert(s.hello(12) == 12);
}

/***************************************************/
// 10928

struct D10928
{
int x;
~this() @nogc {}
}

void f10928a(D10928 bar)
{
(){ bar.x++; }();
}
void f10928b(D10928 bar) @nogc
{
(){ bar.x++; }();
}

void test10928()
{
f10928a(D10928.init);
f10928b(D10928.init);
}

/***************************************************/
// 11661

Expand Down Expand Up @@ -1131,6 +1155,7 @@ int main()
test10219();
test10288();
test10336();
test10928();
test11661();
test11774();
test12508();
Expand Down

0 comments on commit 4b9df68

Please sign in to comment.