Skip to content

Sema: Allow resilient modules to add enum elements without breaking clients #77191

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

Conversation

tshortli
Copy link
Contributor

In the implementation of #73472, warnings about uncovered cases were upgraded to errors in switches covering enums with an @unknown default case. This change was a mistake; it should not be source breaking for a resilient library to add new cases to a non-frozen enum.

Resolves rdar://138488976.

@tshortli
Copy link
Contributor Author

@swift-ci please test

@tshortli tshortli force-pushed the swift6-nonexhaustive-switch-with-unknown-default-should-not-be-an-error branch 2 times, most recently from c0a02f0 to f08ebfc Compare October 23, 2024 18:17
@tshortli
Copy link
Contributor Author

@swift-ci please test

…lients.

In the implementation of swiftlang#73472,
warnings about uncovered cases were upgraded to errors in switches covering
enums with an `@unknown default` case. This change was a mistake; it should not
be source breaking for a resilient library to add new cases to a non-frozen
enum.

Resolves rdar://138488976.
@tshortli tshortli force-pushed the swift6-nonexhaustive-switch-with-unknown-default-should-not-be-an-error branch from f08ebfc to 0ac8cd3 Compare October 23, 2024 19:41
@tshortli
Copy link
Contributor Author

@swift-ci please smoke test

@tshortli tshortli enabled auto-merge October 23, 2024 19:50
@tshortli
Copy link
Contributor Author

@swift-ci please smoke test Windows

@tshortli
Copy link
Contributor Author

swiftlang/swift-foundation#1004

@swift-ci please smoke test Windows

@tshortli
Copy link
Contributor Author

@swift-ci please smoke test Windows

@tshortli tshortli merged commit 512e6b3 into swiftlang:main Oct 24, 2024
3 checks passed
@tshortli tshortli deleted the swift6-nonexhaustive-switch-with-unknown-default-should-not-be-an-error branch October 24, 2024 16:50
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.

2 participants