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

Make NewType and Extractor irrefutable extractors #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

morgen-peschke
Copy link

TL;DR: This way they won't disable exhaustiveness checking.

The documentation for irrefutable extractors is pretty terse in the 2.12 spec, but the use of Some explicitly called out in the 2.13 spec should still work in 2.12.

This change shouldn't cause any trouble in earlier versions (tested as far back as 2.10.6)

TL;DR: This way they won't disable exhaustiveness checking.

The documentation for irrefutable extractors is pretty terse in the
[2.12 spec](https://www.scala-lang.org/files/archive/spec/2.12/08-pattern-matching.html#irrefutable-patterns),
but the use of `Some` explicitly called out in the
[2.13 spec](https://www.scala-lang.org/files/archive/spec/2.13/08-pattern-matching.html#irrefutable-patterns)
should still work in 2.12.

This change shouldn't cause any trouble in earlier versions (tested as far back as 2.10.6)
@morgen-peschke
Copy link
Author

Also fixes #4

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

1 participant