diff --git a/compiler/src/dotty/tools/dotc/core/TypeErasure.scala b/compiler/src/dotty/tools/dotc/core/TypeErasure.scala index b62327f8b103..321ef835ae78 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeErasure.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeErasure.scala @@ -320,6 +320,7 @@ object TypeErasure { case _ => false } case tp: TypeParamRef => false + case tp: TypeBounds => false case tp: TypeProxy => hasStableErasure(tp.superType) case tp: AndOrType => hasStableErasure(tp.tp1) && hasStableErasure(tp.tp2) case _ => false diff --git a/compiler/src/dotty/tools/dotc/typer/Implicits.scala b/compiler/src/dotty/tools/dotc/typer/Implicits.scala index d35852a2b2e8..07377aea17a5 100644 --- a/compiler/src/dotty/tools/dotc/typer/Implicits.scala +++ b/compiler/src/dotty/tools/dotc/typer/Implicits.scala @@ -564,7 +564,7 @@ trait Implicits { self: Typer => * synthesize a class tag for `T`. */ def synthesizedClassTag(formal: Type)(implicit ctx: Context): Tree = - formal.argTypes match { + formal.argInfos match { case arg :: Nil => fullyDefinedType(arg, "ClassTag argument", pos) match { case defn.ArrayOf(elemTp) => diff --git a/tests/neg/i3630.scala b/tests/neg/i3630.scala new file mode 100644 index 000000000000..2ca36cdffc16 --- /dev/null +++ b/tests/neg/i3630.scala @@ -0,0 +1 @@ +class U { Array(Array(2), Array("a")) } // error: no classtag