Bug 12239 – "undefined identifier" with named import and circular reference
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-02-24T04:47:00Z
Last change time
2017-07-02T16:37:52Z
Keywords
rejects-valid
Assigned to
nobody
Creator
dlang-bugzilla
Comments
Comment #0 by dlang-bugzilla — 2014-02-24T04:47:32Z
////// a.d //////
import b : I = J;
class A
{
I i;
}
////// b.d //////
import a;
class B : A { }
class J { }
/////////////////
Compiler complains:
a.d(5,4): Error: undefined identifier J
Things that unbreak it:
- Adding "import b;" in a
- Moving "I i;" outside class A
- Making B not depend on A
Comment #1 by dlang-bugzilla — 2017-07-02T16:37:52Z