Skip to content

SILGen: Don't use diagnoseUnexpectedEnumCase intrinsic for noncopyable enums. #74505

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
Jun 18, 2024

Conversation

jckarter
Copy link
Contributor

It should be impossible to reach an unexpected case statically while using noncopyable enums, and the intrinsic has not been updated to remove its Copyable requirement. Emit a plain trap in cases where this code emission path might still occur, such as when a redundant but incomplete set of case patterns follow a wildcard pattern. Fixes rdar://130037881.

…ble enums.

It should be impossible to reach an unexpected case statically while using
noncopyable enums, and the intrinsic has not been updated to remove its
`Copyable` requirement. Emit a plain trap in cases where this code emission
path might still occur, such as when a redundant but incomplete set of case
patterns follow a wildcard pattern. Fixes rdar://130037881.
@jckarter
Copy link
Contributor Author

@swift-ci Please test

@jckarter jckarter merged commit 0246150 into swiftlang:main Jun 18, 2024
5 checks passed
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.

1 participant