https://issues.dlang.org/show_bug.cgi?id=16085
Andrei Alexandrescu <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |--- --- Comment #5 from Andrei Alexandrescu <[email protected]> --- (In reply to Martin Nowak from comment #4) > This is just an occurrence of wrong code caused by issue 314, b/c selective > imports weren't checked for visibility until recently. > > struct Bucketizer > { > import whatever : reallocate; // <- private > } > > struct Segregator(LargeAllocator) > { > LargeAllocator _large; > void reallocate() > { > _large.reallocate(); // deprecation > } > } 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: struct Bucketizer { import whatever : reallocate; // <- private bool reallocate(ref void[] b, size_t size) // <- public { ... } } struct Segregator(LargeAllocator) { LargeAllocator _large; void reallocate() { _large.reallocate(); // deprecation } } The member "reallocate" should effectively hide the private import, yet the deprecation message still appears. Reopening, feel free to close if you can clarify. --
