diff --git a/compiler/src/dotty/tools/dotc/transform/init/Objects.scala b/compiler/src/dotty/tools/dotc/transform/init/Objects.scala index 1050fbe85ef2..0f96440f343f 100644 --- a/compiler/src/dotty/tools/dotc/transform/init/Objects.scala +++ b/compiler/src/dotty/tools/dotc/transform/init/Objects.scala @@ -702,6 +702,9 @@ class Objects(using Context @constructorOnly): val arr = OfArray(State.currentObject, summon[Regions.Data]) Heap.writeJoin(arr.addr, args.map(_.value).join) arr + else if target.equals(defn.Predef_classOf) then + // Predef.classOf is a stub method in tasty and is replaced in backend + Bottom else if target.hasSource then val cls = target.owner.enclosingClass.asClass val ddef = target.defTree.asInstanceOf[DefDef]