Skip to content

Commit c2127df

Browse files
committed
ElimErasedValueType: remove unnecessary phase-travelling
It's fine to unlink these methods in the current phase since we're unlinking them in a new scope that will only be installed in the next phase.
1 parent efb8115 commit c2127df

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@ class ElimErasedValueType extends MiniPhase with InfoTransformer {
3333
case origClass: ClassSymbol if isDerivedValueClass(origClass) =>
3434
val cinfo = tp.asInstanceOf[ClassInfo]
3535
val decls1 = cinfo.decls.cloneScope
36-
ctx.atPhase(this.next) { implicit ctx =>
37-
// Remove synthetic cast methods introduced by ExtensionMethods,
38-
// they are no longer needed after this phase.
39-
decls1.unlink(cinfo.decl(nme.U2EVT).symbol)
40-
decls1.unlink(cinfo.decl(nme.EVT2U).symbol)
41-
}
36+
// Remove synthetic cast methods introduced by ExtensionMethods,
37+
// they are no longer needed after this phase.
38+
decls1.unlink(cinfo.decl(nme.U2EVT).symbol)
39+
decls1.unlink(cinfo.decl(nme.EVT2U).symbol)
4240
cinfo.derivedClassInfo(decls = decls1)
4341
case _ =>
4442
tp

0 commit comments

Comments
 (0)