Skip to content
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

Keep unsupported union values as-is #53

Merged
merged 1 commit into from
Jun 2, 2021

Conversation

datbth
Copy link
Contributor

@datbth datbth commented Jun 2, 2021

Summary

  • Keep unsupported union values as-is, instead of raising error. Let sorbet itself raise error if the value does not fit into the union type.

Description

I believe this behavior makes it more convenient to deal with union types when coercing.

instead of raising error
Copy link
Contributor

@donaldong donaldong left a comment

Choose a reason for hiding this comment

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

Nice! This makes sense to me.

Thanks for contributing!

@donaldong donaldong merged commit e59c635 into chanzuckerberg:master Jun 2, 2021
@mattxwang mattxwang mentioned this pull request Aug 3, 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.

None yet

2 participants