Skip to content

Commit

Permalink
chore: Do not report macro warning for String interpolators
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzaremmal committed Feb 6, 2025
1 parent 1b817c3 commit 24380eb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compiler/src/dotty/tools/dotc/transform/PostTyper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 24380eb

Please sign in to comment.