https://issues.dlang.org/show_bug.cgi?id=15985
--- Comment #6 from Walter Bright <bugzi...@digitalmars.com> --- (In reply to ag0aep6g from comment #4) > void f()() > { > g!()(); > h!()(); > } > > void g()() { f!()(); } > void h()() { f!()(); } > > enum x = is(typeof(f!()())); > alias my_g = g!(); > > void main() {} Here's what I suspect is going on with this. Let's follow the semantic analsysis: 1. x is the first to get semantically analyzed. The typeof instantiates f!() 2. f!() instantiates g!() and h!() 3. my_g instantiates g!() directly h!() is only instantiated indirectly, and since that instantiation happens during a typeof, it never gets marked as needing code to be generated for it. --