Skip to content

Commit c0272d1

Browse files
committed
Replace some Macro by Inline flags
1 parent 65c1446 commit c0272d1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/src/dotty/tools/dotc/transform/ReifyQuotes.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ class ReifyQuotes extends MacroTransformWithImplicits {
240240
def tryHeal(tp: Type, pos: Position)(implicit ctx: Context): Option[String] = tp match {
241241
case tp: TypeRef =>
242242
if (level == 0) {
243-
assert(ctx.owner.ownersIterator.exists(_.is(Macro)))
243+
assert(ctx.owner.ownersIterator.exists(_.is(Inline)))
244244
None
245245
} else {
246246
val reqType = defn.QuotedTypeType.appliedTo(tp)
@@ -271,7 +271,7 @@ class ReifyQuotes extends MacroTransformWithImplicits {
271271
else i"${sym.name}.this"
272272
if (!isThis && sym.maybeOwner.isType && !sym.is(Param))
273273
check(sym.owner, sym.owner.thisType, pos)
274-
else if (level == 1 && sym.isType && sym.is(Param) && sym.owner.is(Macro) && !outer.isRoot)
274+
else if (level == 1 && sym.isType && sym.is(Param) && sym.owner.is(Inline) && !outer.isRoot)
275275
importedTags(sym.typeRef) = capturers(sym)(ref(sym))
276276
else if (sym.exists && !sym.isStaticOwner && !levelOK(sym))
277277
for (errMsg <- tryHeal(tp, pos))
@@ -488,7 +488,7 @@ class ReifyQuotes extends MacroTransformWithImplicits {
488488

489489
outer.enteredSyms.foreach(registerCapturer)
490490

491-
if (ctx.owner.owner.is(Macro)) {
491+
if (ctx.owner.owner.is(Inline)) {
492492
registerCapturer(defn.TastyTopLevelSplice_tastyContext)
493493
// Force a macro to have the context in first position
494494
forceCapture(defn.TastyTopLevelSplice_tastyContext)
@@ -612,7 +612,7 @@ class ReifyQuotes extends MacroTransformWithImplicits {
612612
}
613613

614614
private def isStage0Value(sym: Symbol)(implicit ctx: Context): Boolean =
615-
(sym.is(Inline) && sym.owner.is(Macro) && !defn.isFunctionType(sym.info)) ||
615+
(sym.is(Inline) && sym.owner.is(Inline) && !defn.isFunctionType(sym.info)) ||
616616
sym == defn.TastyTopLevelSplice_tastyContext // intrinsic value at stage 0
617617

618618
private def liftList(list: List[Tree], tpe: Type)(implicit ctx: Context): Tree = {

0 commit comments

Comments
 (0)