Skip to content

Commit

Permalink
testsuite: Add another test for issue 18057
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuclaw committed Jan 22, 2019
1 parent ba961d6 commit 8d6d1ea
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/fail_compilation/fail18057b.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
TEST_OUTPUT:
---
fail_compilation/fail18057b.d(12): Error: variable `fail18057b.Recursive.field` recursive initialization of field
---
*/

// https://issues.dlang.org/show_bug.cgi?id=18057
// Recursive field initializer causes segfault.
struct Recursive
{
int field = Recursive();
}

0 comments on commit 8d6d1ea

Please sign in to comment.