Skip to content

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