Bug 4692 – Cyclic import breaks is() in a static if in a struct

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2010-08-20T14:10:00Z
Last change time
2010-10-05T07:45:47Z
Assigned to
nobody
Creator
nyphbl8d

Comments

Comment #0 by nyphbl8d — 2010-08-20T14:10:04Z
Compilation fails with: breaker.d(11): Error: identifier 'r' is not defined breaker.d(7): Error: template instance breaker.ElemType!() error instantiating given the following for breaker.d: module breaker; import breaker; void main(){} struct Test { static if (is(ElemType!())) {} } template ElemType() { alias r ElemType; } Note that when you remove "import breaker;", the code compiles without error. This was distilled from a 4 module circular import.
Comment #1 by r.sagitario — 2010-08-21T00:46:14Z
could be a variation of bug 4302.
Comment #2 by nyphbl8d — 2010-10-05T07:45:47Z
This seems to be fixed in the latest DMD 1.064.