Skip to content

Commit ad4ce03

Browse files
committed
Search for classtag only during typer.
We do not want to do implicit search during tree checking.
1 parent 050c9af commit ad4ce03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
432432
val tpt1 = typedTpt
433433
// special case for an abstract type that comes with a class tag
434434
tpt1.tpe.dealias match {
435-
case tref: TypeRef if !tref.symbol.isClass =>
435+
case tref: TypeRef if !tref.symbol.isClass && !ctx.isAfterTyper =>
436436
inferImplicit(defn.ClassTagType.appliedTo(tref),
437437
EmptyTree, tpt1.pos)(ctx.retractMode(Mode.Pattern)) match {
438438
case SearchSuccess(arg, _, _) =>

0 commit comments

Comments
 (0)