Skip to content

Fix #6570: Don't reduce match types with empty scrutinies #7364

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 3 commits into from
Oct 10, 2019

Conversation

OlivierBlanvillain
Copy link
Contributor

This PR fixes the soundness hole exposed in #6570 by adding an extra condition to match type reduction: scrutinies should be non empty.

The new name is explicit about the function output in case of
uncertainty.
Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

@odersky odersky assigned OlivierBlanvillain and unassigned odersky Oct 9, 2019
@OlivierBlanvillain OlivierBlanvillain merged commit cef08d9 into scala:master Oct 10, 2019
@OlivierBlanvillain OlivierBlanvillain deleted the fix-6570-1 branch October 10, 2019 14:34
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