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.
could be a variation of bug 4302.
This seems to be fixed in the latest DMD 1.064.