Bug 16607 – [REG2.072b1] forward reference error for nested struct

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-10-11T08:05:19Z
Last change time
2018-12-21T05:29:46Z
Keywords
pull, rejects-valid
Assigned to
No Owner
Creator
Vladimir Panteleev
See also
https://issues.dlang.org/show_bug.cgi?id=16627, https://issues.dlang.org/show_bug.cgi?id=17307, https://issues.dlang.org/show_bug.cgi?id=18606

Comments

Comment #0 by dlang-bugzilla — 2016-10-11T08:05:19Z
//////// 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
Comment #1 by code — 2016-10-19T23:27:08Z
Comment #2 by code — 2016-10-25T11:40:46Z
Comment #3 by github-bugzilla — 2016-10-27T10:20:26Z
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
Comment #4 by github-bugzilla — 2016-11-05T03:41:38Z
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
Comment #5 by github-bugzilla — 2016-12-27T14:40:48Z
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
Comment #6 by github-bugzilla — 2017-01-16T23:24:03Z
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