You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- [E057] TypeMismatchError:try/i4160.scala:5:17----------------------------5| bla[[X<:Int] =>Foo[X]] // error|^|Type argument Foo does not conform to upper bound Foo
The type argument is incorrectly reduced to Foo leading to a meaningless error message.
The text was updated successfully, but these errors were encountered:
A few more testcases (assuming #4108 goes in), not sure if they need to be tested separately. This is right:
scala>traitFoo[F<:AnyKind]
scala>typeBar1= [F<:AnyKind] =>Foo[F]
// defined alias type Bar1 = Foo
but this is not:
scala>typeBar2= [F] =>Foo[F]
// defined alias type Bar2 = Foo
scala>typeBar3= [F<:Any] =>Foo[F]
// defined alias type Bar3 = Foo
since Bar2/Bar3 and Foo have different argument bounds. Luckily this only affects the output:
scala>valv:Bar1[Bar1] =nullvalv:Foo[Bar1] =null
scala>valv:Bar2[Bar2] =null1|valv:Bar2[Bar2] =null|^^^^|Type argument Bar2 has not the same kind as its bound
scala>valv:Bar3[Bar3] =null1|valv:Bar3[Bar3] =null|^^^^|Type argument Bar3 has not the same kind as its bound
The type argument is incorrectly reduced to
Foo
leading to a meaningless error message.The text was updated successfully, but these errors were encountered: