digitalmars.D.bugs - [Issue 15400] New: inconsistent local `import` behavior
- via Digitalmars-d-bugs (26/26) Dec 02 2015 https://issues.dlang.org/show_bug.cgi?id=15400
https://issues.dlang.org/show_bug.cgi?id=15400 Issue ID: 15400 Summary: inconsistent local `import` behavior Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: ketmar ketmar.no-ip.org this code compiles ok: void boo () { immutable std = 42; import std.conv; } but this one fails with "declaration z02.boo.std is already defined": void boo () { import std.conv; immutable std = 42; } i think both variants should have the same behavior: either both should work, or both should fail. --
Dec 02 2015