https://issues.dlang.org/show_bug.cgi?id=22579
--- Comment #6 from moonlightsenti...@disroot.org --- Reduced example: --- issue22579.d // Use auto instead of int[] to force semantic on the function body auto foo(int i) { return [i]; } int[] bar()(int i) { return [i]; } --- main.d import issue22579; extern(C) int main() { // foo is emitted for issue22579 and hence only causes errors when // the it is a root module (-i or passed on the command line) foo(1); // bar is instantiated in / emitted to main and hence always // triggers errors in the glue layer // bar(2); return 0; } --- dmd -betterC -c main.d <Success> dmd -betterC -c main.d issue22579.d issue22579.d(4): Error: `TypeInfo` cannot be used with -betterC --