[Issue 10378] Prevent local imports from hiding local symbols

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Feb 17 13:04:16 PST 2016


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

--- Comment #31 from hsteoh at quickfur.ath.cx ---
Ouch. That's a pretty nasty one. I suppose it's because the inner import pulls
in 'write' into a different overload set from the outer import, so the compiler
doesn't complain about the ambiguity error, even though the user did not intend
to call std.file.write (rather than std.stdio.write) here.

So unqualified local imports are still extremely dangerous... :-(

--


More information about the Digitalmars-d-bugs mailing list