Skip to content

Add exhaustivity check tests #6894

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 2 commits into from
Jul 19, 2019

Conversation

liufengyun
Copy link
Contributor

Add exhaustivity check tests

case _: ConstantType => this
case _ => widen
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems to me better to revert this change, as (1) tests/patmat/t11603.scala is not a real use case and it's hard to imagine one; (2) it does not work if the scrutinee and pattern are both singletons (again why use patmat for such case).

- it's not a real use case and it's hard to imagine one
- it does not work if the scrutinee and case are both singletons
Copy link
Contributor

@nicolasstucki nicolasstucki 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

@nicolasstucki nicolasstucki merged commit 54b08e1 into scala:master Jul 19, 2019
@nicolasstucki nicolasstucki deleted the add-exhaustivity-tests branch July 19, 2019 14:59
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