class Foo(T) { Node!T head; class Node(T) {} } void main() { auto f = new Foo!int; } dmd prints: test.d(2): Error: template instance Node!(int) forward references template declaration Node(T) test.d(2): Error: Node!(int) is used as a type test.d(2): Error: variable test.Foo!(int).Foo.head voids have no value test.d(6): Error: template instance test.Foo!(int) error instantiating
A simpler case example: struct Foo(T) { Node!T head; struct Node(T) {} } void main() { Foo!int f; } dmd 2.043 prints many errors: test.d(2): Error: template instance Node!(int) forward references template declaration Node(T) test.d(2): Error: Node!(int) is used as a type test.d(2): Error: variable test.Foo!(int).Foo.head voids have no value test.d(6): Error: template instance test.Foo!(int) error instantiating
The first case in comment#0 was fixed in 2.064, by fixing issue 10583. The second case in comment #1 was fixed in 2.059.