https://issues.dlang.org/show_bug.cgi?id=16481
--- Comment #3 from John Colvin <[email protected]> --- (In reply to ag0aep6g from comment #2) > Reduced further: > > ---- > enum e = is(typeof(fun!())); > void fun()() { auto m = MapResult!()(0); } > alias f = fun!(); > > struct MapResult() > { > this(int) {} > void front() { undefined(); } > } > ---- > > Looks similar to issue 16239. > > When the 0 in `MapResult!()(0)` is removed, the program compiles and links > (with -main). => accepts-invalid A little further info: if you remove the enum e line, then compilation fails as expected, complaining about undefined. If you change alias f = fun!() to void bar() { fun!(); } then there is no change (confirming that it's not a question of whether the unused fun instantiation needs to be emitted) --
