Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6214 from MartinNowak/fix16607
fix Issue 16607 - forward reference error for nested struct
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
struct A(T) | ||
{ | ||
T t; // causes A to be SIZEOKfwd b/c B (passed as T) isn't yet done | ||
|
||
// On the 2nd semantic pass through A, _scope of C got set again, | ||
// even though the struct was already done. | ||
struct C | ||
{ | ||
} | ||
} | ||
|
||
struct B | ||
{ | ||
A!B* a; // causes instantiation of A!B, but can finish semantic with A!B still being fwdref | ||
} |