We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b537220 commit fb13bc7Copy full SHA for fb13bc7
compiler/src/dotty/tools/dotc/typer/Checking.scala
@@ -799,7 +799,7 @@ trait Checking {
799
800
/** Check that `tpt` does not define a higher-kinded type */
801
def checkSimpleKinded(tpt: Tree)(implicit ctx: Context): Tree =
802
- if (!tpt.tpe.hasSimpleKind && !ctx.compilationUnit.isJava) {
+ if (!tpt.tpe.dealias.hasSimpleKind && !ctx.compilationUnit.isJava) {
803
// be more lenient with missing type params in Java,
804
// needed to make pos/java-interop/t1196 work.
805
errorTree(tpt, MissingTypeParameterFor(tpt.tpe))
tests/pos/i6083.scala
@@ -0,0 +1,3 @@
1
+type K[T <: AnyKind] = T
2
+val a: K[Int] = 1
3
+val b: K[List][Int] = Nil
0 commit comments