Skip to content

Commit 975cee5

Browse files
committed
Remove un-needed transform
Phantom `var`s where disallowed.
1 parent a6beba4 commit 975cee5

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

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

-10
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,6 @@ class PhantomArgLift extends MiniPhaseTransform {
5252
}
5353
}
5454

55-
override def transformAssign(tree: Assign)(implicit ctx: Context, info: TransformerInfo): Tree = {
56-
if (!tree.rhs.tpe.isPhantom) super.transformAssign(tree)
57-
else {
58-
// Apply the same transformation to setters before their creation.
59-
val synthVal = SyntheticValDef(TempResultName.fresh(), tree.rhs)
60-
val synthValRef = ref(synthVal.symbol)
61-
Block(List(synthVal), Assign(tree.lhs, synthValRef))
62-
}
63-
}
64-
6555
/* private methods */
6656

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

0 commit comments

Comments
 (0)