Comment #1 by default_357-line — 2023-06-14T12:07:07Z
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.
Comment #2 by dlang-bugzilla — 2023-06-14T12:48:00Z
Comment #3 by razvan.nitu1305 — 2023-06-19T09:31:17Z
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 ***
Comment #4 by dlang-bugzilla — 2023-06-19T09:35:49Z
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?
Comment #5 by razvan.nitu1305 — 2023-06-19T09:41:37Z
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.