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: [email protected]
Reporter: [email protected]
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.
--