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

Make 'private function is not accessible' deprecation an error. #15319

Conversation

FeepingCreature
Copy link
Contributor

Affects issue 21275, 23947.
Followup to #15282

@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
21275 enhancement Overload resolution bypasses private access
23947 major If a class overloads a method mixing private and public and the last overload is public, the method is always public.

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#15319"

Copy link
Contributor

@RazvanN7 RazvanN7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please also add a changelog entry?

@FeepingCreature FeepingCreature force-pushed the fix/private-ignored-deprecation-to-error branch from f7f53d6 to c40ee69 Compare June 13, 2023 12:38
@FeepingCreature
Copy link
Contributor Author

Changelog added.

@FeepingCreature FeepingCreature force-pushed the fix/private-ignored-deprecation-to-error branch 2 times, most recently from 827c8eb to fd0ebb9 Compare June 13, 2023 12:41
@FeepingCreature
Copy link
Contributor Author

FeepingCreature commented Jun 13, 2023

Ah, hm.

Note that the changelog as written is a bit iffy: the deprecation period for 21275 started with 2.094, but my 23947 was merged a few days ago and absorbed 21275's deprecation message because the check for 23947 also covered 21275.

I don't think 23947 deserves a deprecation of its own. Then again, I'm not sure why 21275 wasn't fixed immediately to begin with, particularly considering the trivial remedy of "just make whatever you couldn't access, public instead".

If 23947 got its own deprecation period, I'd have to split them back into separate codepaths.

@RazvanN7
Copy link
Contributor

All of these are aspects of the same bug so it makes sense to just turn the deprecation into an error for all.

@RazvanN7 RazvanN7 merged commit 36043de into dlang:master Jun 16, 2023
@FeepingCreature FeepingCreature deleted the fix/private-ignored-deprecation-to-error branch June 16, 2023 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants