www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15567] New: local import hijacking

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

          Issue ID: 15567
           Summary: local import hijacking
           Product: D
           Version: D2
          Hardware: All
               URL: http://dlang.org/
                OS: All
            Status: NEW
          Severity: major
          Priority: P3
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: bheads moxiegroup.com

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

--
Jan 14