Skip to content

Commit 2134c45

Browse files
authored
Merge pull request #8821 from dotty-staging/drop-macro-flag-for-retained-inline
Cleanup uses of Macro flag
2 parents 8d63015 + 3105be8 commit 2134c45

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

compiler/src/dotty/tools/dotc/core/TypeOps.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,6 @@ trait TypeOps { thisCtx: Context => // TODO: Make standalone object.
468468
/** Are we in an inline method body? */
469469
def inInlineMethod: Boolean = owner.ownersIterator.exists(_.isInlineMethod)
470470

471-
/** Are we in a macro? */
472-
def inMacro: Boolean = owner.ownersIterator.exists(s => s.isInlineMethod && s.is(Macro))
473-
474471
/** Refine child based on parent
475472
*
476473
* In child class definition, we have:

compiler/src/dotty/tools/dotc/typer/Inliner.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ object Inliner {
183183

184184
val retainer = meth.copy(
185185
name = BodyRetainerName(meth.name),
186-
flags = meth.flags &~ (Inline | Override) | Private,
186+
flags = meth.flags &~ (Inline | Macro | Override) | Private,
187187
coord = mdef.rhs.span.startPos).asTerm
188188
polyDefDef(retainer, targs => prefss =>
189189
inlineCall(
@@ -1253,7 +1253,6 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(using Context) {
12531253
constToLiteral(betaReduce(super.typedApply(tree, pt))) match {
12541254
case res: Apply if res.symbol == defn.InternalQuoted_exprSplice
12551255
&& level == 0
1256-
&& call.symbol.is(Macro)
12571256
&& !suppressInline =>
12581257
expandMacro(res.args.head, tree.span)
12591258
case res => res

0 commit comments

Comments
 (0)