Skip to content

Commit 79db79a

Browse files
committed
Fix assertion in erasure to correctly print name of the phase.
1 parent 5133124 commit 79db79a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/transform/Erasure.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class Erasure extends Phase with DenotTransformer { thisTransformer =>
109109
}
110110

111111
def assertErased(tp: Type, tree: tpd.Tree = tpd.EmptyTree)(implicit ctx: Context): Unit =
112-
assert(isErasedType(tp), i"The type $tp - ${tp.toString} of class ${tp.getClass} of tree $tree : ${tree.tpe} / ${tree.getClass} is illegal after erasure, phase = ${ctx.phase}")
112+
assert(isErasedType(tp), i"The type $tp - ${tp.toString} of class ${tp.getClass} of tree $tree : ${tree.tpe} / ${tree.getClass} is illegal after erasure, phase = ${ctx.phase.prev}")
113113
}
114114

115115
object Erasure extends TypeTestsCasts{

0 commit comments

Comments
 (0)