Crashes DMD 2.060alpha: class Foo(T) { Foo n; } auto bar(T)(Foo!T t) pure { return t ? bar(t.n) : []; } void main() { bar!int(null); } Replacing "auto" with "T[]" it compiles. Maybe it's caused by a forward reference bug. Removing "pure" it gives: test.d(5): Error: forward reference to inferred return type of function call bar(t.n) test.d(8): Error: template instance test.bar!(int) error instantiating test.d(8): Error: forward reference to bar
No ice with 2.062
Now it gives: temp.d(5): Error: forward reference to inferred return type of function call bar(t.n) temp.d(8): Error: template instance temp.bar!(int) error instantiating temp.d(8): Error: forward reference to bar Closed.