Skip to content

Commit 1643e2f

Browse files
committed
Search for classtag only during typer.
We do not want to do implicit search during tree checking.
1 parent 4250b26 commit 1643e2f

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
@@ -431,7 +431,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
431431
val tpt1 = typedTpt
432432
// special case for an abstract type that comes with a class tag
433433
tpt1.tpe.dealias match {
434-
case tref: TypeRef if !tref.symbol.isClass =>
434+
case tref: TypeRef if !tref.symbol.isClass && !ctx.isAfterTyper =>
435435
inferImplicit(defn.ClassTagType.appliedTo(tref),
436436
EmptyTree, tpt1.pos)(ctx.retractMode(Mode.Pattern)) match {
437437
case SearchSuccess(arg, _, _) =>

0 commit comments

Comments
 (0)