Skip to content

Commit ebe73b3

Browse files
committed
Remove unnecessary transformation
1 parent 67c30ce commit ebe73b3

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,6 @@ class ReifyQuotes extends MacroTransformWithImplicits {
335335
tree match {
336336
case Quoted(quotedTree) =>
337337
quotation(quotedTree, tree)
338-
case tree: TypeTree if tree.tpe.typeSymbol.isSplice =>
339-
val splicedType = tree.tpe.stripTypeVar.asInstanceOf[TypeRef].prefix.termSymbol
340-
splice(ref(splicedType).select(tpnme.UNARY_~).withPos(tree.pos))
341338
case tree: Select if tree.symbol.isSplice =>
342339
splice(tree)
343340
case tree: RefTree if tree.symbol.is(Inline) && tree.symbol.is(Param) =>

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ import dotty.tools.dotc.core.quoted._
1818
import dotty.tools.dotc.util.SourcePosition
1919

2020

21-
/** Checks that the phase consistency principle (PCP) holds.
21+
/** Checks that the phase consistency principle (PCP) holds, heals types and expand macros.
2222
*
23-
* TODO
23+
* Type healing consists in transforming a phase inconsistent type `T` into `implicitly[Type[T]].unary_~`.
2424
*
2525
* For macro definitions we assume that we have a single ~ directly as the RHS.
2626
* The Splicer is used to check that the RHS will be interpretable (with the `Splicer`) once inlined.
@@ -369,9 +369,6 @@ class Staging extends MacroTransformWithImplicits {
369369
tree match {
370370
case Quoted(quotedTree) =>
371371
quotation(quotedTree, tree)
372-
case tree: TypeTree if tree.tpe.typeSymbol.isSplice =>
373-
val splicedType = tree.tpe.stripTypeVar.asInstanceOf[TypeRef].prefix.termSymbol
374-
splice(ref(splicedType).select(tpnme.UNARY_~).withPos(tree.pos))
375372
case tree: Select if tree.symbol.isSplice =>
376373
splice(tree)
377374
case tree: RefTree if tree.symbol.is(Inline) && tree.symbol.is(Param) =>

0 commit comments

Comments
 (0)