Skip to content

Commit

Permalink
Merge pull request #6263 from aG0aep6G/16102
Browse files Browse the repository at this point in the history
Fix issue 16102 - [REG2.070] struct dtor replace value on stack
  • Loading branch information
Михаил Страшун committed Nov 20, 2016
2 parents 7776ed4 + 6bff452 commit fd9eed4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/runnable/mars1.d
Original file line number Diff line number Diff line change
Expand Up @@ -1477,6 +1477,23 @@ void test16699()

////////////////////////////////////////////////////////////////////////

// https://issues.dlang.org/show_bug.cgi?id=16102

struct S16102 { ~this() { } }

long[1] f16102()
{
S16102 a;
return [1];
}

void test16102()
{
assert( f16102() == [1] );
}

////////////////////////////////////////////////////////////////////////

int main()
{
testgoto();
Expand Down Expand Up @@ -1528,6 +1545,7 @@ int main()
test15861();
test15629();
test16699();
test16102();
printf("Success\n");
return 0;
}

0 comments on commit fd9eed4

Please sign in to comment.