https://d.puremagic.com/issues/show_bug.cgi?id=12279

           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: nob...@puremagic.com
        ReportedBy: c...@dawg.eu


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

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

void foo()
{
    import a;
    kill(0, 1);
}
CODE

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: -------

Reply via email to