File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -457,6 +457,9 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
457
457
/** Are we in an inline method body? */
458
458
def inInlineMethod : Boolean = owner.ownersIterator.exists(_.isInlineMethod)
459
459
460
+ /** Are we in a macro? */
461
+ def inMacro : Boolean = owner.ownersIterator.exists(s => s.isInlineMethod && s.is(Macro ))
462
+
460
463
/** Is `feature` enabled in class `owner`?
461
464
* This is the case if one of the following two alternatives holds:
462
465
*
Original file line number Diff line number Diff line change @@ -729,7 +729,7 @@ trait Implicits { self: Typer =>
729
729
730
730
lazy val synthesizedQuoteContext : SpecialHandler =
731
731
(formal, span) => implicit ctx =>
732
- if (ctx.inInlineMethod || enclosingInlineds.nonEmpty) ref(defn.QuoteContext_macroContext )
732
+ if (ctx.inMacro || enclosingInlineds.nonEmpty) ref(defn.QuoteContext_macroContext )
733
733
else EmptyTree
734
734
735
735
lazy val synthesizedTupleFunction : SpecialHandler =
You can’t perform that action at this time.
0 commit comments