//////// test.d //////// struct A(T) { T t; struct C { } } struct B { A!(typeof(this))* a; } //////////////////////// Compiler output: test.d(5): Error: struct test.A!(B).A.C has forward references test.d(12): Error: template instance test.A!(B) error instantiating Introduced in https://github.com/D-Programming-Language/dmd/pull/5500
Also caused by the 2nd commit of that PR https://github.com/dlang/dmd/pull/5500/commits/75b5b691555bef2d2f21b44821f297f93ddfbc77.
https://github.com/dlang/dmd/pull/6214
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/b295ff509a52cd332d975014279ed891e11f465d fix Issue 16607 - forward reference error for nested struct - This reverts removing the AggregateDeclaration.setScope override (see 75b5b69155) and fixes a wrong error triggered by setting _scope on a SIZEOKdone struct during deferred setScope phases (outer struct has forward references). https://github.com/dlang/dmd/commit/9dfa50e8fccd9b888a52300abb99eb3d669fb869 Merge pull request #6214 from MartinNowak/fix16607 fix Issue 16607 - forward reference error for nested struct
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/b295ff509a52cd332d975014279ed891e11f465d fix Issue 16607 - forward reference error for nested struct https://github.com/dlang/dmd/commit/9dfa50e8fccd9b888a52300abb99eb3d669fb869 Merge pull request #6214 from MartinNowak/fix16607
Commits pushed to scope at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/b295ff509a52cd332d975014279ed891e11f465d fix Issue 16607 - forward reference error for nested struct https://github.com/dlang/dmd/commit/9dfa50e8fccd9b888a52300abb99eb3d669fb869 Merge pull request #6214 from MartinNowak/fix16607
Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/b295ff509a52cd332d975014279ed891e11f465d fix Issue 16607 - forward reference error for nested struct https://github.com/dlang/dmd/commit/9dfa50e8fccd9b888a52300abb99eb3d669fb869 Merge pull request #6214 from MartinNowak/fix16607