[Issue 16085] Imported name causes lookup deprecation warning even if masked by member name

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon May 30 07:53:23 PDT 2016


--- Comment #6 from Martin Nowak <code at dawg.eu> ---
(In reply to Andrei Alexandrescu from comment #5)
> The issue is subtler than that (I'd agree the snippet above is a clear cut).
> The thing is Bucketizer _also_ defines its own reallocate:

Ah, I was already wondering what was actually called now, but didn't have more
time to investigate.

> struct Bucketizer
> {
>     import whatever : reallocate; // <- private
>     bool reallocate(ref void[] b, size_t size) // <- public
>     { ... }
> The member "reallocate" should effectively hide the private import, yet the
> deprecation message still appears.

It doesn't hide but overloads the selective import. Public/private overloads
should have public visibility but will be access checked after overload
Seems like the overload code
doesn't work properly.


More information about the Digitalmars-d-bugs mailing list