Skip to content

Commit c2f6362

Browse files
committed
Rename Spliced to SplicedExpr
1 parent 824295e commit c2f6362

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

compiler/src/dotty/tools/dotc/ast/TreeInfo.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
10441044
}
10451045

10461046
/** Extractors for splices */
1047-
object Spliced {
1047+
object SplicedExpr {
10481048
/** Extracts the content of a spliced expression tree.
10491049
* The result can be the contents of a term splice, which
10501050
* will return a term tree.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ class Inliner(val call: tpd.Tree)(using Context):
817817
override def typedApply(tree: untpd.Apply, pt: Type)(using Context): Tree =
818818
def cancelQuotes(tree: Tree): Tree =
819819
tree match
820-
case Quoted(Spliced(inner)) => inner
820+
case Quoted(SplicedExpr(inner)) => inner
821821
case _ => tree
822822
val locked = ctx.typerState.ownedVars
823823
val res = cancelQuotes(constToLiteral(BetaReduce(super.typedApply(tree, pt)))) match {
@@ -1071,7 +1071,7 @@ class Inliner(val call: tpd.Tree)(using Context):
10711071
level += 1
10721072
try apply(syms, body)
10731073
finally level -= 1
1074-
case Spliced(body) =>
1074+
case SplicedExpr(body) =>
10751075
level -= 1
10761076
try apply(syms, body)
10771077
finally level += 1

compiler/src/dotty/tools/dotc/inlines/PrepareInlineable.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ object PrepareInlineable {
290290
if (inlined.is(Macro) && !ctx.isAfterTyper) {
291291

292292
def checkMacro(tree: Tree): Unit = tree match {
293-
case Spliced(code) =>
293+
case SplicedExpr(code) =>
294294
if (code.symbol.flags.is(Inline))
295295
report.error("Macro cannot be implemented with an `inline` method", code.srcPos)
296296
Splicer.checkValidMacroBody(code)

compiler/src/dotty/tools/dotc/staging/TreeMapWithStages.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ abstract class TreeMapWithStages extends TreeMapWithImplicits {
6161
val old = inQuoteOrSplice
6262
inQuoteOrSplice = true
6363
try dropEmptyBlocks(quotedTree) match {
64-
case Spliced(t) =>
64+
case SplicedExpr(t) =>
6565
// Optimization: `'{ $x }` --> `x`
6666
// and adapt the refinement of `Quotes { type reflect: ... } ?=> Expr[T]`
6767
transform(t).asInstance(tree.tpe)
6868
case _ => transformQuotation(quotedTree, tree)
6969
}
7070
finally inQuoteOrSplice = old
7171

72-
case tree @ Spliced(splicedTree) =>
72+
case tree @ SplicedExpr(splicedTree) =>
7373
val old = inQuoteOrSplice
7474
inQuoteOrSplice = true
7575
try dropEmptyBlocks(splicedTree) match {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ object Splicer {
158158
case Apply(Select(Apply(fn, quoted :: Nil), nme.apply), _) if fn.symbol == defn.QuotedRuntime_exprQuote =>
159159
val noSpliceChecker = new TreeTraverser {
160160
def traverse(tree: Tree)(using Context): Unit = tree match
161-
case Spliced(_) =>
161+
case SplicedExpr(_) =>
162162
report.error("Quoted argument of macros may not have splices", tree.srcPos)
163163
case _ =>
164164
traverseChildren(tree)

0 commit comments

Comments
 (0)