Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix Issue 19473 - DMD Segfault on circular struct reference
- Loading branch information
1 parent
33bc192
commit d2b6fc9
Showing
4 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* TEST_OUTPUT: | ||
--- | ||
fail_compilation/test19473.d(14): Error: union `test19473.P` no size because of forward reference | ||
--- | ||
*/ | ||
|
||
// https://issues.dlang.org/show_bug.cgi?id=19473 | ||
|
||
struct A { | ||
P p; | ||
|
||
struct UTpl() { | ||
union { | ||
P p; | ||
} | ||
} | ||
|
||
alias U = UTpl!(); | ||
} | ||
|
||
alias B = A.U; | ||
|
||
struct C { | ||
union D { | ||
B b; | ||
} | ||
} | ||
|
||
union P { | ||
C.D p; | ||
} |