Skip to content

Pattern matching for @nullable records. #5453

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 5 commits into from
Jun 22, 2022
Merged

Pattern matching for @nullable records. #5453

merged 5 commits into from
Jun 22, 2022

Conversation

cristianoc
Copy link
Collaborator

This gives pattern matching that mimics expression constructor, where the variable by default is not optional.
The generated code seems fine, thought the checks for exhaustiveness are not kicking in.

See #5452

This gives pattern matching that mimics expression constructor, where the variable by default is not optional.
The generated code seems fine, thought the checks for exhaustiveness are not kicking in.

See #5452
A pattern is type checked twice.
The second time for the exhaustive check coming from the pattern matcher.
The second time constructors, such as optionals, have been replaced by fresh symbols starting with `#$`.
Now recognize these symbols and do not apply the transformation which adds Some.
@cristianoc cristianoc merged commit f022a84 into master Jun 22, 2022
@cristianoc cristianoc deleted the nullable_pattern branch June 22, 2022 02:56
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