-
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
Chaining Match Types fails at value level #13855
Labels
Comments
minimised to type A[X] = X match
case Int => Int
case _ => Int
def a[X](x: X): A[X] = x match
case x: Int => x
case _ => 0 the way to fix this minimised case and the example is to replace type A[X] = X match
case Int => Int
case Any => Int
def a[X](x: X): A[X] = x match
case x: Int => x
case _: Any => 0 |
I think this basically waits on #12261 |
@bishabosha thanks! Makes completely sense! |
OlivierBlanvillain
added a commit
to dotty-staging/dotty
that referenced
this issue
Jan 26, 2022
Xavientois
pushed a commit
to Xavientois/dotty
that referenced
this issue
Feb 2, 2022
olsdavis
pushed a commit
to olsdavis/dotty
that referenced
this issue
Apr 4, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compiler version
3.1.0
Minimized code
Output
Expectation
Should compile?
The type calculation works fine for chained Match Types. Only when adding the value level implementation it fails.
This works:
The text was updated successfully, but these errors were encountered: