-
-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue 20637: Don't offer private type property corrections #10867
Fix issue 20637: Don't offer private type property corrections #10867
Conversation
Thanks for your pull request and interest in making D better, @FeepingCreature! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#10867" |
c25347d
to
d89b839
Compare
Errors seem spurious? Someone seems to have committed a broken state. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is really a mess. Half of those properties can't be redefined, the other half can but it doesn't really make sense most of the time (you can redefine offsetof and init
).
That search_correct
shouldn't really be there, but it just seems to be the last place it gets to for a DotIdExp
. Anyway the fix LGTM. For the spurious error, try rebasing on master, the parent of your commit is bea5d22.
Oh! I'd fetched from |
… visible from the current scope.
d89b839
to
388a16e
Compare
Note that this can be reverted once the issue of private members not printing a proper "private member not accessible" error is fixed. |
So in this case, why not just go with that fix directly ? |
Well, primarily because I don't know how to do it. :P |
Do you have a test case for it ? :) |
Well, if you look at b7f2e63 , reintroducing something like those would be the way to go. I think they were removed in the context of the deprecation and removal of private access being silently tolerated sometimes. |
Let's go with this. It's simple, it works, and has a test case. |
Check whether property is visible locally before offering a correction. Pass through scope to
getProperty
to enable this.