diff --git a/compiler/src/dotty/tools/dotc/core/TypeApplications.scala b/compiler/src/dotty/tools/dotc/core/TypeApplications.scala index bc0cf76094ac..45c5ce8586bc 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeApplications.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeApplications.scala @@ -211,7 +211,10 @@ class TypeApplications(val self: Type) extends AnyVal { /** Is self type of kind "*"? */ def hasSimpleKind(implicit ctx: Context): Boolean = - typeParams.isEmpty && !self.hasAnyKind + typeParams.isEmpty && !self.hasAnyKind || { + val alias = self.dealias + (alias ne self) && alias.hasSimpleKind + } /** If self type is higher-kinded, its result type, otherwise NoType. * Note: The hkResult of an any-kinded type is again AnyKind. diff --git a/tests/pos/i6083.scala b/tests/pos/i6083.scala new file mode 100644 index 000000000000..e3945d13007b --- /dev/null +++ b/tests/pos/i6083.scala @@ -0,0 +1,3 @@ +type K[T <: AnyKind] = T +val a: K[Int] = 1 +val b: K[List][Int] = Nil \ No newline at end of file