@@ -36,7 +36,7 @@ import scala.annotation.constructorOnly
3636 * val x1 = ???
3737 * val x2 = ???
3838 * ...
39- * ~ { ... '{ ... x1 ... x2 ...} ... }
39+ * $ { ... '{ ... x1 ... x2 ...} ... }
4040 * ...
4141 * }
4242 * ```
@@ -56,12 +56,12 @@ import scala.annotation.constructorOnly
5656 * val x1$1 = args(0).asInstanceOf[Expr[T]]
5757 * val x2$1 = args(1).asInstanceOf[Expr[T]] // can be asInstanceOf[Type[T]]
5858 * ...
59- * { ... '{ ... x1$1.unary_~ ... x2$1.unary_~ ...} ... }
59+ * { ... '{ ... ${ x1$1} ... ${ x2$1} ...} ... }
6060 * }
6161 * )
6262 * )
6363 * ```
64- * and then performs the same transformation on `'{ ... x1$1.unary_~ ... x2$1.unary_~ ...}`.
64+ * and then performs the same transformation on `'{ ... ${ x1$1} ... ${ x2$1} ...}`.
6565 *
6666 */
6767class ReifyQuotes extends MacroTransform {
@@ -95,9 +95,9 @@ class ReifyQuotes extends MacroTransform {
9595 * Returns a version of the reference that needs to be used in its place.
9696 * '{
9797 * val x = ???
98- * { ... '{ ... x ... } ... }.unary_~
98+ * $ { ... '{ ... x ... } ... }
9999 * }
100- * Eta expanding the `x` in `{ ... '{ ... x ... } ... }.unary_~ ` will return a `x$1.unary_~ ` for which the `x$1`
100+ * Eta expanding the `x` in `$ { ... '{ ... x ... } ... }` will return a `${ x$1} ` for which the `x$1`
101101 * be created by some outer reifier.
102102 * This transformation is only applied to definitions at staging level 1.
103103 * See `isCaptured`.
@@ -113,11 +113,11 @@ class ReifyQuotes extends MacroTransform {
113113 new QuoteReifier (this , capturers, nestedEmbedded, ctx.owner)(ctx)
114114 }
115115
116- /** Assuming <expr> contains types `<tag1>.unary_~ , ..., <tagN>.unary_~ `, the expression
116+ /** Assuming <expr> contains types `${ <tag1>} , ..., ${ <tagN>} `, the expression
117117 *
118- * { type <Type1> = <tag1>.unary_~
118+ * { type <Type1> = ${ <tag1>}
119119 * ...
120- * type <TypeN> = <tagN>.unary_~
120+ * type <TypeN> = ${ <tagN>}
121121 * <expr>
122122 * }
123123 *
@@ -133,7 +133,7 @@ class ReifyQuotes extends MacroTransform {
133133 val alias = ctx.typeAssigner.assignType(untpd.TypeBoundsTree (rhs, rhs), rhs, rhs)
134134 val local = ctx.newSymbol(
135135 owner = ctx.owner,
136- name = UniqueName .fresh((splicedTree.symbol.name.toString + " $_~ " ).toTermName).toTypeName,
136+ name = UniqueName .fresh((splicedTree.symbol.name.toString + " $_" ).toTermName).toTypeName,
137137 flags = Synthetic ,
138138 info = TypeAlias (splicedTree.tpe.select(tpnme.splice)),
139139 coord = spliced.termSymbol.coord).asType
@@ -178,7 +178,7 @@ class ReifyQuotes extends MacroTransform {
178178 else body match {
179179 case body : RefTree if isCaptured(body.symbol, level + 1 ) =>
180180 // Optimization: avoid the full conversion when capturing `x`
181- // in '{ x } to '{ x$1.unary_~ } and go directly to `x$1`
181+ // in '{ x } to '{ ${ x$1} } and go directly to `x$1`
182182 capturers(body.symbol)(body)
183183 case _=>
184184 val (body1, splices) = nested(isQuote = true ).splitQuote(body)(quoteContext)
@@ -246,15 +246,15 @@ class ReifyQuotes extends MacroTransform {
246246 * '{
247247 * val x = ???
248248 * val y = ???
249- * { ... '{ ... x .. y ... } ... }.unary_~
249+ * $ { ... '{ ... x .. y ... } ... }
250250 * }
251251 * then the spliced subexpression
252252 * { ... '{ ... x ... y ... } ... }
253253 * will be transformed to
254254 * (args: Seq[Any]) => {
255255 * val x$1 = args(0).asInstanceOf[Expr[Any]] // or .asInstanceOf[Type[Any]]
256256 * val y$1 = args(1).asInstanceOf[Expr[Any]] // or .asInstanceOf[Type[Any]]
257- * { ... '{ ... x$1.unary_~ ... y$1.unary_~ ... } ... }
257+ * { ... '{ ... ${ x$1} ... ${ y$1} ... } ... }
258258 * }
259259 *
260260 * See: `capture`
@@ -347,7 +347,7 @@ class ReifyQuotes extends MacroTransform {
347347 reporting.trace(i " Reifier.transform $tree at $level" , show = true ) {
348348 tree match {
349349 case TypeApply (Select (spliceTree @ Spliced (_), _), tp) if tree.symbol.isTypeCast =>
350- // Splice term which should be in the form `x.unary_~. asInstanceOf[T]` where T is an artefact of
350+ // Splice term which should be in the form `${x}. asInstanceOf[T]` where T is an artifact of
351351 // typer to allow pickling/unpickling phase consistent types
352352 transformSplice(spliceTree)
353353
0 commit comments