Thread overview | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
May 27, 2016 [Issue 16085] Imported name causes lookup deprecation warning even if masked by member name | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16085 --- Comment #1 from Andrei Alexandrescu <andrei@erdani.com> --- https://github.com/dlang/phobos/pull/4371 -- |
May 27, 2016 [Issue 16085] Imported name causes lookup deprecation warning even if masked by member name | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16085 Martin Nowak <code@dawg.eu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |code@dawg.eu Assignee|nobody@puremagic.com |code@dawg.eu --- Comment #2 from Martin Nowak <code@dawg.eu> --- Error case import common = std.experimental.allocator.common : roundUpToMultipleOf, reallocate; common.reallocate(foo, bar); -- |
May 29, 2016 [Issue 16085] Imported name causes lookup deprecation warning even if masked by member name | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16085 Martin Nowak <code@dawg.eu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #3 from Martin Nowak <code@dawg.eu> --- Error message at https://github.com/dlang/phobos/commit/140c51447feb951d62016cf62d8349e013ecd521^ std/experimental/allocator/building_blocks/segregator.d(188): Deprecation: std.experimental.allocator.building_blocks.bucketizer.Bucketizer!(FreeList!(GCAllocator, 0LU, 18446744073709551615LU, cast(Flag)false), 1LU, 128LU, 16LU).Bucketizer.reallocate is not visible from module std.experimental.allocator.building_blocks.segregator std/experimental/allocator/building_blocks/segregator.d(182): Deprecation: std.experimental.allocator.building_blocks.bucketizer.Bucketizer!(FreeList!(GCAllocator, 0LU, 18446744073709551615LU, cast(Flag)false), 129LU, 256LU, 32LU).Bucketizer.reallocate is not visible from module std.experimental.allocator.building_blocks.segregator std/experimental/allocator/building_blocks/segregator.d(188): Deprecation: std.experimental.allocator.building_blocks.bucketizer.Bucketizer!(FreeList!(GCAllocator, 0LU, 18446744073709551615LU, cast(Flag)false), 257LU, 512LU, 64LU).Bucketizer.reallocate is not visible from module std.experimental.allocator.building_blocks.segregator std/experimental/allocator/building_blocks/segregator.d(182): Deprecation: std.experimental.allocator.building_blocks.bucketizer.Bucketizer!(FreeList!(GCAllocator, 0LU, 18446744073709551615LU, cast(Flag)false), 513LU, 1024LU, 128LU).Bucketizer.reallocate is not visible from module std.experimental.allocator.building_blocks.segregator std/experimental/allocator/building_blocks/segregator.d(188): Deprecation: std.experimental.allocator.building_blocks.bucketizer.Bucketizer!(FreeList!(GCAllocator, 0LU, 18446744073709551615LU, cast(Flag)false), 1025LU, 2048LU, 256LU).Bucketizer.reallocate is not visible from module std.experimental.allocator.building_blocks.segregator std/experimental/allocator/building_blocks/segregator.d(182): Deprecation: std.experimental.allocator.building_blocks.bucketizer.Bucketizer!(FreeList!(GCAllocator, 0LU, 18446744073709551615LU, cast(Flag)false), 2049LU, 3584LU, 512LU).Bucketizer.reallocate is not visible from module std.experimental.allocator.building_blocks.segregator -- |
May 29, 2016 [Issue 16085] Imported name causes lookup deprecation warning even if masked by member name | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16085 --- Comment #4 from Martin Nowak <code@dawg.eu> --- 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 } } -- |
May 30, 2016 [Issue 16085] Imported name causes lookup deprecation warning even if masked by member name | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16085 Andrei Alexandrescu <andrei@erdani.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |--- --- Comment #5 from Andrei Alexandrescu <andrei@erdani.com> --- (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. -- |
May 30, 2016 [Issue 16085] Imported name causes lookup deprecation warning even if masked by member name | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16085 --- Comment #6 from Martin Nowak <code@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 resolution. Seems like the overload code https://github.com/dlang/dmd/blob/356353041c3d26d525e43f1ea6a9b36211ba523f/src/access.d#L481-L491 doesn't work properly. -- |
May 30, 2016 [Issue 16085] Imported name causes lookup deprecation warning even if masked by member name | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16085 --- Comment #7 from Andrei Alexandrescu <andrei@erdani.com> --- (In reply to Martin Nowak from comment #6) > (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 > resolution. > Seems like the overload code > https://github.com/dlang/dmd/blob/356353041c3d26d525e43f1ea6a9b36211ba523f/ > src/access.d#L481-L491 doesn't work properly. Great, thanks! -- |
May 30, 2016 [Issue 16085] wrong visibility warning for overloaded alias symbol | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16085 Martin Nowak <code@dawg.eu> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Imported name causes lookup |wrong visibility warning |deprecation warning even if |for overloaded alias symbol |masked by member name | -- |
May 30, 2016 [Issue 16085] wrong visibility warning for overloaded alias symbol | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16085 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla@digitalmars.com --- Comment #8 from Walter Bright <bugzilla@digitalmars.com> --- (In reply to Andrei Alexandrescu from comment #5) > struct Bucketizer > { > import whatever : reallocate; // <- private This is the equivalent of: alias reallocate = whatever.reallocate; meaning that the declaration is in the current scope, not the import scope. > The member "reallocate" should effectively hide the private import, yet the deprecation message still appears. The private import is hidden. The alias is not. -- |
May 31, 2016 [Issue 16085] wrong visibility warning for overloaded alias symbol | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16085 --- Comment #9 from Martin Nowak <code@dawg.eu> --- (In reply to Walter Bright from comment #8) > > The member "reallocate" should effectively hide the private import, yet the deprecation message still appears. > > The private import is hidden. The alias is not. Don't quite get that comment. Imports are private by default, so are the selectively imported symbol aliases. Already figured out what's wrong with the overload implementation in symbolIsVisible, just need to find time to fix it. -- |
Copyright © 1999-2021 by the D Language Foundation