[Issue 15966] [REG 2.071] {public,protected} imports in base class ignored on symbol lookup

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon May 9 06:03:18 PDT 2016


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

--- Comment #6 from Mathias Lang <mathias.lang at sociomantic.com> ---
(In reply to Walter Bright from comment #3)
> The trouble is that imports in the base class will override global imports
> referred to by the derived class. This is exactly the kind of problem the
> import changes were so strongly desired to fix.
> 
> The compiler is working as designed, this is deliberate behavior.

I don't see why it should be a problem. A base class in another module can
already override global imports by introducing new local symbols.
It's expected when changing a base class than touching any non-private symbol
can affect derived class.

--


More information about the Digitalmars-d-bugs mailing list