Mistake in subkinding #2067
Labels
fixed in Scala 3
This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)
has PR
should not compile
tcpoly
typer
Milestone
Now, the kinds are:
In type application
A[C]
,C
is substituted instead of the type parameterB
, which leads to the ill-kinded type application C[P] in the return type of f().So
(* -> * -> *) -> *
must be a subkind of(X@* -> *(Nothing,X) -> *) -> *
.Contravariantly,
X@* -> *(Nothing,X) -> *
must be a subkind of* -> * -> *
.Contravariantly,
*
must be a subkind of*(Nothing,X)
, but this is not the case.The text was updated successfully, but these errors were encountered: