Skip to content

[Diagnostics] Don't include @unknown default in the empty switch fix-it #28476

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 1 commit into from
Dec 2, 2019

Conversation

owenv
Copy link
Contributor

@owenv owenv commented Nov 25, 2019

Resolves SR-11672. This turned out to only affect the fix-it for empty switch statements, which is why the existing tests didn't catch it.

@owenv owenv requested a review from CodaFi November 25, 2019 23:25
@varungandhi-apple
Copy link
Contributor

Since the bug report mentions frozen enums, could you add some test cases for frozen enums as well? Perhaps 3 test cases: (1) same module + not inlinable (2) same module + inlinable (3) different module. In all three cases, there shouldn't be any @unknown default.

@owenv
Copy link
Contributor Author

owenv commented Nov 26, 2019

@varungandhi-apple 👍 , done. I think the bug report was referring more to implicitly frozen enums in the same module, but it never hurts to have the extra test coverage.

Copy link
Contributor

@CodaFi CodaFi left a comment

Choose a reason for hiding this comment

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

Thanks!

@CodaFi
Copy link
Contributor

CodaFi commented Nov 26, 2019

@swift-ci please smoke test

@owenv
Copy link
Contributor Author

owenv commented Dec 2, 2019

@swift-ci please smoke test and merge

1 similar comment
@owenv
Copy link
Contributor Author

owenv commented Dec 2, 2019

@swift-ci please smoke test and merge

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.

4 participants