https://issues.dlang.org/show_bug.cgi?id=17738
--- Comment #1 from Dominikus Dittes Scherkl <domini...@scherkl.de> --- Sorry, that was gdc, and it was the compilation that only stopped after stack overflow was reached (which took about 10 minutes). dmd (2.075.0) directly fails with a segmentation fault (exit code 139). (and of course it fails only, if foo is actually instantiated somewhere) So, is it not allowed to access (type)definitions from outside the function where they are declared, or is this a real bug? If it should not be allowed (which I would call a pitty), than a proper error message should be provided. Else I would expect foo and foo2 to compile to exactly the same assembly code. --