Closed
Description
Compiler version
3.1.2
Minimized code
type F[t] =
t match
case {type A = Float} => Int
case {type A = Int} => String
val a: F[{type A = Float}] = 10
val b: F[{type A = Int}] = "asd" // Found:("asd" : String) Required: F[Object{A = Int}]
Output
Found:("asd" : String) Required: F[Object{A = Int}]
Expectation
I expect the compiler to either do the right match (accepting string value for val b
) or give some diagnostic about the limitation of match types not playing with structural patterns