[Issue 17738] access to local alias from outside compiles but execution hangs

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Aug 11 10:45:41 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=17738

--- Comment #1 from Dominikus Dittes Scherkl <dominikus at 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.

--


More information about the Digitalmars-d-bugs mailing list