Bug 15567 – local import hijacking

Status
RESOLVED
Resolution
DUPLICATE
Severity
major
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-01-14T14:21:00Z
Last change time
2016-01-21T22:52:54Z
Assigned to
nobody
Creator
bheads

Comments

Comment #0 by bheads — 2016-01-14T14:21:14Z
Got burned by this: import std.experimental.logger : trace; void foo() { import std.net.curl : trace; trace("hello"); } void main() { foo(); } This should not compile and give an error on the use of the ambiguous call to trace. confirmed on DMD 2.069.2 on windows
Comment #1 by bheads — 2016-01-14T16:34:16Z
The implicit locals should not hijack globals import std.experimental.logger; void foo() { import std.net.curl; trace("hello"); } void main() { foo(); }
Comment #2 by hsteoh — 2016-01-21T22:52:54Z
*** This issue has been marked as a duplicate of issue 10378 ***