Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
June 14, 2023 [Issue 23991] [REG2.087.0] Private top-level overloads are callable if any overload is public | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23991 Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://issues.dlang.org/sh | |ow_bug.cgi?id=23992 -- |
June 14, 2023 [Issue 23991] [REG2.087.0] Private top-level overloads are callable if any overload is public | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23991 FeepingCreature <default_357-line@yahoo.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |default_357-line@yahoo.de --- Comment #1 from FeepingCreature <default_357-line@yahoo.de> --- Not a dupe, but see also https://issues.dlang.org/show_bug.cgi?id=23947 I believe this whole class of issues arises from the use of `mostVisibleOverload` in `checkAccess`: if only one of a set of overloads is public, it considers all of them public. It's supposed to re-check permissions once it has selected an overload, but it often does not do so. -- |
June 14, 2023 [Issue 23991] [REG2.087.0] Private top-level overloads are callable if any overload is public | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23991 --- Comment #2 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> --- (In reply to FeepingCreature from comment #1) > Not a dupe, but see also https://issues.dlang.org/show_bug.cgi?id=23947 Not a dupe but https://issues.dlang.org/show_bug.cgi?id=23992 is! Plz bisect bugs (many many bugs filed here are actually regressions) and post the link to the bug in the introducing PR, this is a very good way to detect duplicates (much more precise than keyword search). https://github.com/CyberShadow/misc/blob/master/dreg.d should help with this. -- |
June 19, 2023 [Issue 23991] [REG2.087.0] Private top-level overloads are callable if any overload is public | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23991 RazvanN <razvan.nitu1305@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |razvan.nitu1305@gmail.com Resolution|--- |DUPLICATE --- Comment #3 from RazvanN <razvan.nitu1305@gmail.com> --- This is a dupe of a long standing issue: https://issues.dlang.org/show_bug.cgi?id=3254 . I have repeatedly tried to fix it, but unfortunately, as long as we support public aliases to public symbols with the current alias eager resolution scheme it is impossible to fix this. *** This issue has been marked as a duplicate of issue 3254 *** -- |
June 19, 2023 [Issue 23991] [REG2.087.0] Private top-level overloads are callable if any overload is public | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23991 --- Comment #4 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> --- OK, but I am curious why the test program above correctly failed to compile before 2.087.0. In other words, how can this be a long-standing issue and a regression at the same time? -- |
June 19, 2023 [Issue 23991] [REG2.087.0] Private top-level overloads are callable if any overload is public | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23991 --- Comment #5 from RazvanN <razvan.nitu1305@gmail.com> --- This is just a hypothesis, I haven't checked it but: support for public aliases to private functions is a half baked feature. I wouldn't be surprised if its implementation accidentally made this case to work but disabled a proper use case for the alias to private symbols. Then, maybe the alias problem was solved and the overload problem returned. -- |
Copyright © 1999-2021 by the D Language Foundation