Skip to content

[region-isolation] Make "unknown pattern error" always an error. #75137

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

Conversation

gottesmm
Copy link
Contributor

This shows an actual issue with the compiler where semantically we should crash. Rather than crashing (due to the broken invariants), we emit this error so that the user gets a nice error message at the problem place and can work around it instead of just getting a mysterious crash.

Previously, we were making this a warning in swift 5 mode... but given the issues, it makes sense to emit an error diagnostic so we get the feedback and the user cannot ship the code.

rdar://131482934

This shows an actual issue with the compiler where semantically we should crash.
Rather than crashing (due to the broken invariants), we emit this error so that
the user gets a nice error message at the problem place and can work around it
instead of just getting a mysterious crash.

Previously, we were making this a warning in swift 5 mode... but given the
issues, it makes sense to emit an error diagnostic so we get the feedback and
the user cannot ship the code.

rdar://131482934
@gottesmm gottesmm requested a review from eeckstein as a code owner July 10, 2024 19:48
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm gottesmm enabled auto-merge July 10, 2024 19:48
@gottesmm
Copy link
Contributor Author

@swift-ci test source compatibility

@gottesmm gottesmm merged commit 8e5222e into swiftlang:main Jul 10, 2024
3 of 5 checks passed
@gottesmm gottesmm deleted the pr-cd357557374bb800097ac08777ae16e5e8082abb branch July 11, 2024 03:35
@gottesmm
Copy link
Contributor Author

Btw for anyone listening in... both source compat runs 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.

2 participants