--- enum E { x } void g(T)() { } void main() { with(E) g!int(); } --- OPTLINK output: --- OPTLINK (R) for Win32 Release 8.00.12 ... Error 42: Symbol Undefined _D4main9__T1gTAiZ1gFNaNbNfAiZE4main1E --- The source of such link failures is not just unexpected and hard to reduce. Worst of all one will likely think this is one of "unfixable" OPTLINK buffer overflow bugs making D unusable on Windows (or is it a cross-platform issue?).
*** This issue has been marked as a duplicate of issue 8414 ***