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
It seems that in the code snippet above, the compiler wrongly assumes that the wildcard argument X$1 (which is the type parameter of class Refl) is a higher-kinded type. And it complains that there is no type parameters supplied to X$1. However, it is simple-kinded.
I found that the bound A >: C <: C is necessary to trigger the error. And we have to match SUB[B, A] instead of SUB[A, B]. Not sure how these conditions are related to this issue.
Output
[info] running (fork) dotty.tools.dotc.Main-classpath /Users/linyxus/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.8/scala-library-2.13.8.jar:/Users/linyxus/Workspace/dotty/library/../out/bootstrap/scala3-library-bootstrapped/scala-3.1.3-RC1-bin-SNAPSHOT-nonbootstrapped/scala3-library_3-3.1.3-RC1-bin-SNAPSHOT.jar -color:never issues/simple-kind-error.scala
-- [E141] TypeError: issues/simple-kind-error.scala:5:15-----------------------------------------------------------------------------------------------------------------------------------------------------------5|caseSUB.Refl() =>|^|MissingtypeparametersforX$1|| longer explanation available when compiling with`-explain`1 error found
[error] Nonzero exit code returned from runner: 1
[error] (scala3-compiler /Compile/ runMain) Nonzero exit code returned from runner: 1
[error] Totaltime: 3 s, completed Mar23, 2022, 7:59:28PM
Expectation
The code should compile.
The text was updated successfully, but these errors were encountered:
Compiler version
3.1.2-RC2
Minimized code
It seems that in the code snippet above, the compiler wrongly assumes that the wildcard argument
X$1
(which is the type parameter of class Refl) is a higher-kinded type. And it complains that there is no type parameters supplied toX$1
. However, it is simple-kinded.I found that the bound
A >: C <: C
is necessary to trigger the error. And we have to matchSUB[B, A]
instead ofSUB[A, B]
. Not sure how these conditions are related to this issue.Output
Expectation
The code should compile.
The text was updated successfully, but these errors were encountered: