Skip to content

Commit

Permalink
Remove un-needed transform
Browse files Browse the repository at this point in the history
Phantom `var`s where disallowed.
  • Loading branch information
nicolasstucki committed Jul 17, 2017
1 parent a6beba4 commit 975cee5
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions compiler/src/dotty/tools/dotc/transform/PhantomArgLift.scala
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,6 @@ class PhantomArgLift extends MiniPhaseTransform {
}
}

override def transformAssign(tree: Assign)(implicit ctx: Context, info: TransformerInfo): Tree = {
if (!tree.rhs.tpe.isPhantom) super.transformAssign(tree)
else {
// Apply the same transformation to setters before their creation.
val synthVal = SyntheticValDef(TempResultName.fresh(), tree.rhs)
val synthValRef = ref(synthVal.symbol)
Block(List(synthVal), Assign(tree.lhs, synthValRef))
}
}

/* private methods */

/** Returns true if at least on of the arguments is an impure phantom.
Expand Down

0 comments on commit 975cee5

Please sign in to comment.