diff --git a/compiler/src/dotty/tools/dotc/transform/PostTyper.scala b/compiler/src/dotty/tools/dotc/transform/PostTyper.scala index 46beb262c23f..df74e102f693 100644 --- a/compiler/src/dotty/tools/dotc/transform/PostTyper.scala +++ b/compiler/src/dotty/tools/dotc/transform/PostTyper.scala @@ -256,7 +256,10 @@ class PostTyper extends MacroTransform with InfoTransformer { thisPhase => for publicInBinaryAnnot <- publicInBinaryAnnotOpt do sym.addAnnotation(publicInBinaryAnnot) else sym.keepAnnotationsCarrying(thisPhase, Set(defn.GetterMetaAnnot, defn.FieldMetaAnnot), orNoneOf = defn.NonBeanMetaAnnots) - if sym.isScala2Macro && !ctx.settings.XignoreScala2Macros.value then + if sym.isScala2Macro && !ctx.settings.XignoreScala2Macros.value && + sym != defn.StringContext_raw && + sym != defn.StringContext_f && + sym != defn.StringContext_s then if !sym.owner.unforcedDecls.exists(p => !p.isScala2Macro && p.name == sym.name && p.signature == sym.signature) // Allow scala.reflect.materializeClassTag to be able to compile scala/reflect/package.scala // This should be removed on Scala 3.x