Skip to content

Commit d909736

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

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
@@ -1524,11 +1524,12 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
15241524
if (formal.isRef(defn.ClassTagClass))
15251525
formal.argTypes match {
15261526
case arg :: Nil =>
1527-
arg.underlyingClassRef(refinementOK = false) match {
1527+
val tp = fullyDefinedType(arg, "ClassTag argument", tree.pos)
1528+
tp.underlyingClassRef(refinementOK = false) match {
15281529
case tref: TypeRef =>
15291530
return ref(defn.ClassTagModule)
15301531
.select(nme.apply)
1531-
.appliedToType(arg)
1532+
.appliedToType(tp)
15321533
.appliedTo(clsOf(tref))
15331534
.withPos(tree.pos.endPos)
15341535
case _ =>

0 commit comments

Comments
 (0)