-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Diagnostics] SR-7349 Improve accessibility diagnostics for inheritance from generic classes #16223
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
[Diagnostics] SR-7349 Improve accessibility diagnostics for inheritance from generic classes #16223
Conversation
Fixed misleading warning when message pointed to the type's superclass access level instead of the access level of the type used as a generic parameter of the superclass when inheriting
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.
LGTM, thank you!
@swift-ci please smoke test and merge |
Wait! I haven't taken care of the error-version yet. This diagnostic is downgraded to a warning right now, but judging by the tests in |
@AnthonyLatsis It's okay, you can do it in the separate PR as well. |
I thought that this is what you message meant :) |
Alright, no problem. I can request to merge the same branch, right? |
I think that should be okay, but I managed to stop the 'test + merge' job so we can have it all in one. Please add |
Ready to smoke test & merge. |
@swift-ci please test |
Merged, thank you! |
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.
Thanks, Anthony!
ACEK_Requirement | ||
enum ACEK { | ||
Parameter = 0, | ||
Requirement |
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 pollutes the surrounding namespace unless the enum is declared with enum class
.
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.
Ah, true. It is OK to commit the change here?
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.
You can open separate PR for to correct this, it's not a problem!
Resolves https://bugs.swift.org/browse/SR-7349
Have updated only the warning, going to update the error version of the diagnostic in a few hours.