[Issue 12279] New: function local imports are not hijack safe
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Feb 28 12:45:31 PST 2014
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: nobody at puremagic.com
ReportedBy: code at dawg.eu
--- Comment #0 from Martin Nowak <code at 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: -------
More information about the Digitalmars-d-bugs
mailing list