[Issue 15179] Local imports cause outer imports to be excluded from overload set

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Mar 29 20:38:48 PDT 2016


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

--- Comment #8 from Jesse Phillips <Jesse.K.Phillips+D at gmail.com> ---
(In reply to Steven Schveighoffer from comment #7)
> (In reply to Jesse Phillips from comment #6)
> > That doesn't solve the highjacking, Walter has made a big point about D's
> > anti-highjacking feature.
> 
> Yes, it does. Selective imports override any non-selective import because
> it's aliased into the local namespace.

It does not. Since I wrote code where selective imports was not necessary, an
update to a second library being used hijacked my call and the compiler gave no
warning. That is the hijack problem, the fact that I can modify my code to use
the desired function is not relevant to how the compiler is supposed to help
prevent hijacking: http://dlang.org/hijack.html

--


More information about the Digitalmars-d-bugs mailing list