From 947c808abf7b2587d97d3fc207c628d30aae9d40 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Mon, 23 Oct 2023 17:38:08 +0200 Subject: [PATCH] Update macro check --- compiler/src/dotty/tools/dotc/transform/YCheckPositions.scala | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/transform/YCheckPositions.scala b/compiler/src/dotty/tools/dotc/transform/YCheckPositions.scala index 14f5c430513e..e841e1d706cf 100644 --- a/compiler/src/dotty/tools/dotc/transform/YCheckPositions.scala +++ b/compiler/src/dotty/tools/dotc/transform/YCheckPositions.scala @@ -62,9 +62,7 @@ class YCheckPositions extends Phase { private def isMacro(call: Tree)(using Context) = call.symbol.is(Macro) || (call.symbol.isClass && call.tpe.derivesFrom(defn.MacroAnnotationClass)) || - // The call of a macro after typer is encoded as a Select while other inlines are Ident - // TODO remove this distinction once Inline nodes of expanded macros can be trusted (also in Inliner.inlineCallTrace) - (!(ctx.phase <= postTyperPhase) && call.isInstanceOf[Select]) + (!(ctx.phase <= postTyperPhase) && call.symbol.is(Macro)) }