Skip to content

[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

Merged
merged 3 commits into from
Apr 28, 2018

Conversation

AnthonyLatsis
Copy link
Collaborator

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.

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
Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@xedin
Copy link
Contributor

xedin commented Apr 27, 2018

@swift-ci please smoke test and merge

@AnthonyLatsis
Copy link
Collaborator Author

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 Sema/accessibility.swift(which expect errors for the same tests that expect warnings in Compatibility/accessibility.swift) it will become an error for future Swift versions.

@xedin
Copy link
Contributor

xedin commented Apr 27, 2018

@AnthonyLatsis It's okay, you can do it in the separate PR as well.

@xedin
Copy link
Contributor

xedin commented Apr 27, 2018

I thought that this is what you message meant :)

@AnthonyLatsis
Copy link
Collaborator Author

Alright, no problem. I can request to merge the same branch, right?

@xedin
Copy link
Contributor

xedin commented Apr 27, 2018

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 [WIP] or [Don't Merge] next time so it's more obvious that you don't want to split the changes...

@AnthonyLatsis
Copy link
Collaborator Author

AnthonyLatsis commented Apr 28, 2018

Ready to smoke test & merge.

@xedin
Copy link
Contributor

xedin commented Apr 28, 2018

@swift-ci please test

@xedin xedin merged commit 79c0516 into swiftlang:master Apr 28, 2018
@xedin
Copy link
Contributor

xedin commented Apr 28, 2018

Merged, thank you!

Copy link
Contributor

@jrose-apple jrose-apple left a 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
Copy link
Contributor

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.

Copy link
Collaborator Author

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?

Copy link
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants