Skip to content

Commit cb8a94e

Browse files
committed
Make type fully defined before searching for a ClassTag for it
1 parent fec0de1 commit cb8a94e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1542,11 +1542,12 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
15421542
if (formal.isRef(defn.ClassTagClass))
15431543
formal.argTypes match {
15441544
case arg :: Nil =>
1545-
arg.underlyingClassRef(refinementOK = false) match {
1545+
val tp = fullyDefinedType(arg, "ClassTag argument", tree.pos)
1546+
tp.underlyingClassRef(refinementOK = false) match {
15461547
case tref: TypeRef =>
15471548
return ref(defn.ClassTagModule)
15481549
.select(nme.apply)
1549-
.appliedToType(arg)
1550+
.appliedToType(tp)
15501551
.appliedTo(clsOf(tref))
15511552
.withPos(tree.pos.endPos)
15521553
case _ =>

0 commit comments

Comments
 (0)