[Issue 17589] Prevent local imports from hiding imported symbols

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Nov 22 03:51:19 UTC 2020


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

--- Comment #2 from timon.gehr at gmx.ch ---
(In reply to Bolpat from comment #1)
> (In reply to timon.gehr from comment #0)
> > Local imports should overload against less deeply nested imports. In this
> > example, std.stdio.write and std.file.write should be treated as part of the
> > same overload set within readAndLog. Otherwise, there is a hijacking risk.
> 
> ...
> 
> TL;DR: It should be an ambiguity error, nothing else.

Yes absolutely. Reading it now, the original report was not phrased very well.
std.stdio.write and std.file.write should remain in separate overload sets, but
they should overload against each other so that there is an ambiguity error in
this case.

--


More information about the Digitalmars-d-bugs mailing list