Skip to content
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 20638: only offer correction for module property if symbol is visible. #10868

Conversation

FeepingCreature
Copy link
Contributor

Similar to #10867 , but easier to check.

@dlang-bot
Copy link
Contributor

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 verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

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

Auto-close Bugzilla Severity Description
20638 trivial spelling correction offers private member of package on named package access

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#10868"

@FeepingCreature FeepingCreature force-pushed the fix/issue-20638-correction-offers-private-member-of-named-package branch from 42c2bf4 to 031fe1c Compare March 5, 2020 13:33
@FeepingCreature
Copy link
Contributor Author

FeepingCreature commented Mar 5, 2020

Note: The best solution would probably involve passing the scope down search_correct so that can exclude private symbols to start with. I'll take a look at that, see if it's easily done.

@FeepingCreature
Copy link
Contributor Author

FeepingCreature commented Mar 5, 2020

Nevermind, I misthought. When there's a direct match, you're right @thewilsonator that it's always correct to error with "tried to access private member" instead, so the question never comes up.

In the case class Class { private void foo(); public void fob(); }, obj.foo should always print a "private member not accessible" error, not go searching for misspellings, so the fact that the misspelling doesn't point it at fob is not an issue.

Fixing your bug would obviate the need for this PR, because it would run into the proper "private member not accessible" message instead, but until that's fixed this should be fine.

@FeepingCreature FeepingCreature force-pushed the fix/issue-20638-correction-offers-private-member-of-named-package branch from 031fe1c to 0122454 Compare March 6, 2020 06:26
@dlang-bot dlang-bot merged commit 02738cd into dlang:master Mar 6, 2020
@FeepingCreature FeepingCreature deleted the fix/issue-20638-correction-offers-private-member-of-named-package branch March 6, 2020 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants