Skip to content

Commit a426e92

Browse files
committed
Fixes erasure of super
- supertype components needs to be recursively erased Without this fix, some files do not pass -Ycheck:lambdaLift
1 parent 651ff01 commit a426e92

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/dotty/tools/dotc/TypeErasure.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,10 @@ class TypeErasure(isJava: Boolean, isSemi: Boolean, isConstructor: Boolean, wild
258258
else this(parent)
259259
case tp: TermRef =>
260260
this(tp.widen)
261-
case ThisType(_) | SuperType(_, _) =>
261+
case ThisType(_) =>
262262
tp
263+
case SuperType(thistpe, supertpe) =>
264+
SuperType(this(thistpe), this(supertpe))
263265
case ExprType(rt) =>
264266
MethodType(Nil, Nil, this(rt))
265267
case tp: TypeProxy =>

0 commit comments

Comments
 (0)