Skip to content

Commit 644b2c5

Browse files
committed
Add missing names to StdNames
1 parent 77415fe commit 644b2c5

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,7 @@ object StdNames {
503503
val notifyAll_ : N = "notifyAll"
504504
val notify_ : N = "notify"
505505
val null_ : N = "null"
506+
val nullExpr: N = "nullExpr"
506507
val ofDim: N = "ofDim"
507508
val opaque: N = "opaque"
508509
val ordinal: N = "ordinal"
@@ -556,6 +557,7 @@ object StdNames {
556557
val thisPrefix : N = "thisPrefix"
557558
val throw_ : N = "throw"
558559
val toArray: N = "toArray"
560+
val toExpr: N = "toExpr"
559561
val toList: N = "toList"
560562
val toObjectArray : N = "toObjectArray"
561563
val toSeq: N = "toSeq"
@@ -569,6 +571,7 @@ object StdNames {
569571
val unapply: N = "unapply"
570572
val unapplySeq: N = "unapplySeq"
571573
val unbox: N = "unbox"
574+
val unitExpr: N = "unitExpr"
572575
val universe: N = "universe"
573576
val update: N = "update"
574577
val updateDynamic: N = "updateDynamic"

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,14 @@ class ReifyQuotes extends MacroTransform {
208208

209209
def pickleAsLiteral(lit: Literal) =
210210
lit.const.tag match {
211-
case Constants.NullTag => ref(defn.QuotedExprModule).select("nullExpr".toTermName)
212-
case Constants.UnitTag => ref(defn.QuotedExprModule).select("unitExpr".toTermName)
211+
case Constants.NullTag => ref(defn.QuotedExprModule).select(nme.nullExpr)
212+
case Constants.UnitTag => ref(defn.QuotedExprModule).select(nme.unitExpr)
213213
case _ => // Lifted literal
214214
val ltp = defn.LiftableClass.typeRef.appliedTo(ConstantType(lit.const))
215215
val liftable = ctx.typer.inferImplicitArg(ltp, body.span)
216216
if (liftable.tpe.isInstanceOf[SearchFailureType])
217217
ctx.error(ctx.typer.missingArgMsg(liftable, ltp, "Could no optimize constant in quote"), ctx.source.atSpan(body.span))
218-
liftable.select("toExpr".toTermName).appliedTo(lit)
218+
liftable.select(nme.toExpr).appliedTo(lit)
219219
}
220220

221221
def pickleAsTasty() = {

0 commit comments

Comments
 (0)