www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12279] New: function local imports are not hijack safe


           Summary: function local imports are not hijack safe
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: code dawg.eu

--- Comment #0 from Martin Nowak <code dawg.eu> 2014-02-28 12:45:29 PST ---
cat > a.d << CODE
void kill(string) {}

cat > b.d << CODE
void kill(int, int) {}

void foo()
    import a;
    kill(0, 1);

dmd -c b.d

b.d(6): Error: function a.kill (string) is not callable using argument types
(int, int)

Local imports should have the same overload/lookup behavior as global imports,
but they obey a lexical scope.

Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 28 2014