-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Remove irrefutable match pattern #10782
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
Conversation
…e-irrefutable-match-pattern
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @changvvb 👍
Instead of removing the tests, can we adapt them?
I thought they are meaningless because almost all of these tests commented by |
Fair enough. I thought Scala 2.13.4 issues a warning for the code below and we need to do the same as well: scala > val Some(x) = Option(3) But it does not. |
I tried to compile |
Yes, I got the same result. Then it's fine to remove them. Could you please rebase and update the docs, as suggested by @b-studios ? |
@b-studios @liufengyun
and
Now, is it necessary to retain it? |
I think it's worthwhile to keep it and make sure it works. |
…e-irrefutable-match-pattern
Fixes #10614
Remove irrefutable match pattern, so that scala3 has the same behavior as scala2.