Fix Issue 18243 - selective import + overload = private visibility#7766
Fix Issue 18243 - selective import + overload = private visibility#7766andralex merged 1 commit intodlang:masterfrom
Conversation
|
Thanks for your pull request, @RazvanN7! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Some tips to help speed things up:
Bear in mind that large or tricky changes may require multiple rounds of review and revision. Please see CONTRIBUTING.md for more information. Bugzilla references
|
| @@ -0,0 +1,5 @@ | |||
| module a18243; | |||
|
|
|||
| import std.math : isNaN; | |||
There was a problem hiding this comment.
Selective imports creatingalias in the current scope is really an annoyance, and violates the principle of least surprise. I wish we could change that.
There was a problem hiding this comment.
That is a small project on its own which will propagate cascade changes throughout a large number of components.
There was a problem hiding this comment.
Although I agree that the current state is hackish and messy.
There was a problem hiding this comment.
Last time I checked with Walter, it was by design. Maybe that changed since. If you have any way to find out, it would be appreciated.
|
@RazvanN7 It looks like you need to fix a couple of projects. However, they are all in |
|
The jenkins failure is unrelated to this PR. Can we move forward with this? ping @andralex |
|
Is this in the changelog ? |
Not in this PR. |
I fixed the issue by modifying the overloadApply method. The problem was that when resolving overloads the visibility attribute is not checked at all, so I had to add the scope as an optional parameter so that when an alias declaration is encountered (from imports or plain alias declarations) a check is made to make sure that the called function is indeed visible.