Skip to content

Commit e4b93e7

Browse files
committed
Rename synthetic valdef to $quote or $typeQuote
1 parent 2b04c04 commit e4b93e7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/src/dotty/tools/dotc/core/quoted/PickledQuotes.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,18 @@ object PickledQuotes {
5656
val unpickled = unpickle(tastyBytes, expr.args)
5757
unpickled match {
5858
case PackageDef(_, (vdef: ValDef) :: Nil) =>
59-
if (vdef.name == "quote".toTermName) vdef.rhs
59+
if (vdef.name == "$quote".toTermName) vdef.rhs
6060
else vdef.rhs.asInstanceOf[TypeApply].args.head
6161
}
6262
}
6363

6464
/** Encapsulate the tree in a top level `val` or `type`
65-
* `<tree>` ==> `package _root_ { val quote: Any = <tree> }`
65+
* `<tree>` ==> `package _root_ { val $quote: Any = <tree> }`
6666
* or
67-
* `<type tree>` ==> `package _root_ { val typeQuote: Any = null.asInstanceOf[<tree>] }`
67+
* `<type tree>` ==> `package _root_ { val $typeQuote: Any = null.asInstanceOf[<tree>] }`
6868
*/
6969
private def encapsulateQuote(tree: Tree)(implicit ctx: Context): Tree = {
70-
val name = (if (tree.isTerm) "quote" else "typeQuote").toTermName
70+
val name = (if (tree.isTerm) "$quote" else "$typeQuote").toTermName
7171
val sym = ctx.newSymbol(ctx.owner, name, Synthetic, defn.AnyType, coord = tree.pos)
7272
val encoded =
7373
if (tree.isTerm) tree

0 commit comments

Comments
 (0)