Skip to content

Throw error when Output is wrong type #541

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
Jul 5, 2022

Conversation

Azoy
Copy link
Contributor

@Azoy Azoy commented Jul 5, 2022

When casting a string representation to a regex, instead of throwing an actual error if the parsed output type does not match the input output type, we let the cast succeed and crash at runtime. Let's throw an error instead!

@Azoy Azoy requested review from milseman and hamishknight July 5, 2022 18:43
@Azoy
Copy link
Contributor Author

Azoy commented Jul 5, 2022

@swift-ci please test

Copy link
Contributor

@hamishknight hamishknight left a comment

Choose a reason for hiding this comment

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

Thanks!

@Azoy Azoy merged commit bfc3335 into swiftlang:main Jul 5, 2022
@Azoy Azoy deleted the errors-what-errors branch July 5, 2022 20:43
Azoy added a commit to Azoy/swift-experimental-string-processing that referenced this pull request Jul 6, 2022
Throw error when Output is wrong type
hamishknight pushed a commit to hamishknight/swift-experimental-string-processing that referenced this pull request Jul 6, 2022
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