--- interface I; struct S { I a; } enum e = S.tupleof[0].stringof; // line 3 --- Output: --- main.d(3): Error: function expected before (), not "module main"c of type string ---
By git head, the code outputs: ---- test.d(1): Error: interface test.I is forward referenced when looking for 'stringof' ----
This is true for any forward declaration: interface I; struct S; class C; enum ei = I.stringof; enum es = S.stringof; enum ec = C.stringof; test.d(3): Error: interface test.I is forward referenced when looking for 'stringof' test.d(7): Error: struct S is forward referenced test.d(5): Error: class test.C is forward referenced when looking for 'stringof' Note that Walter has stated before that .stringof is allowed to be overriden by the user, so this might have to be closed as invalid.
Works with current master