-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Sealed traits behave different than sealed class for type match reduction #13455
Comments
The difference is that |
How would you create a value of type |
You can't. But I don't think "probablyDisjoint" explores that, to keep it cheap. Perhaps getting it to do that is an acceptable cost. |
Ah, makes sense then, thanks for the explanation, @dwijnand. |
Fix #13455: Also consider sealed classes closed sums
Compiler version
3.0.1
Minimized code
This match type fails with
when the same example with
works?
Expectation
Both examples compile.
The text was updated successfully, but these errors were encountered: