@@ -28,7 +28,7 @@ import scala.annotation.constructorOnly
2828
2929/** Checks that the Phase Consistency Principle (PCP) holds and heals types.
3030 *
31- * Type healing consists in transforming a phase inconsistent type `T` into `implicitly[Type[T]].unary_~ `.
31+ * Type healing consists in transforming a phase inconsistent type `T` into a splice of `implicitly[Type[T]]`.
3232 */
3333class PCPCheckAndHeal (@ constructorOnly ictx : Context ) extends TreeMapWithStages (ictx) {
3434 import tpd ._
@@ -65,16 +65,16 @@ class PCPCheckAndHeal(@constructorOnly ictx: Context) extends TreeMapWithStages(
6565 }
6666 else { // level 0 inside an inline definition
6767 ctx.error(
68- " Malformed macro call. The contents of the $ must call a static method and arguments must be quoted or inline." ,
68+ " Malformed macro call. The contents of the splice ${...} must call a static method and arguments must be quoted or inline." ,
6969 splice.sourcePos)
7070 splice
7171 }
7272 }
7373 }
7474
7575
76- /** Add cast to force boundaries where T and ~ t (an alias of T) are used to ensure PCP.
77- * '{ ~( ...: T) } --> '{ ~( ...: T) .asInstanceOf[T] } --> '{ ~( ...: T) .asInstanceOf[~ t] }
76+ /** Add cast to force boundaries where T and $ t (an alias of T) are used to ensure PCP.
77+ * '{ ${ ...: T} } --> '{ ${ ...: T} .asInstanceOf[T] } --> '{ ${ ...: T} .asInstanceOf[$ t] }
7878 */
7979 protected def addSpliceCast (tree : Tree )(implicit ctx : Context ): Tree = {
8080 val tp = checkType(tree.sourcePos).apply(tree.tpe.widenTermRefExpr)
@@ -86,7 +86,7 @@ class PCPCheckAndHeal(@constructorOnly ictx: Context) extends TreeMapWithStages(
8686 * that are phase-incorrect can still be healed as follows:
8787 *
8888 * If `T` is a reference to a type at the wrong level, try to heal it by replacing it with
89- * `~ implicitly[quoted.Type[T]]`.
89+ * `${ implicitly[quoted.Type[T]]} `.
9090 */
9191 protected def checkLevel (tree : Tree )(implicit ctx : Context ): Tree = {
9292 def checkTp (tp : Type ): Type = checkType(tree.sourcePos).apply(tp)
@@ -144,7 +144,7 @@ class PCPCheckAndHeal(@constructorOnly ictx: Context) extends TreeMapWithStages(
144144 * by which we refer to `sym`. If it is an inconsistent type try construct a healed type for it.
145145 *
146146 * @return `None` if the phase is correct or cannot be healed
147- * `Some(tree)` with the `tree` of the healed type tree for `~ implicitly[quoted.Type[T]]`
147+ * `Some(tree)` with the `tree` of the healed type tree for `${ implicitly[quoted.Type[T]]} `
148148 */
149149 private def checkSymLevel (sym : Symbol , tp : Type , pos : SourcePosition )(implicit ctx : Context ): Option [Tree ] = {
150150 val isThis = tp.isInstanceOf [ThisType ]
0 commit comments