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 #4556 from 9rnsr/fix14406
[REG2.068a] Issue 14406 - GIT HEAD ignores forward reference and generates wrong code
- Loading branch information
Showing
2 changed files
with
30 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,26 @@ | ||
/* | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/fail14406.d-mixin-20(20): Error: variable fail14406.CFrop.bar_obj cannot be further field because it will change the determined CFrop size | ||
fail_compilation/fail14406.d-mixin-25(25): Error: variable fail14406.IFrop.bar_obj field not allowed in interface | ||
--- | ||
*/ | ||
|
||
class Foo {} | ||
|
||
string strMixin(T)() | ||
{ | ||
static if (T.tupleof.length) {} | ||
return "Bar bar_obj; | ||
static class Bar { Foo foo; }"; | ||
} | ||
|
||
class CFrop | ||
{ | ||
mixin(strMixin!(typeof(this))); | ||
} | ||
|
||
interface IFrop | ||
{ | ||
mixin(strMixin!(typeof(this))); | ||
} |