Skip to content

Commit 699e0d8

Browse files
committed
Changed erasure of ThisType
Was: erasure of underlying type. Now: erased typeRef of underlying class. The differ if there is a self type. In this case, a this type did erase to teh erasure of the self type, which is wrong.
1 parent 95ef88f commit 699e0d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/dotty/tools/dotc/TypeErasure.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,8 @@ class TypeErasure(isJava: Boolean, isSemi: Boolean, isConstructor: Boolean, wild
287287
else this(parent)
288288
case tp: TermRef =>
289289
this(tp.widen)
290-
case ThisType(_) =>
291-
this(tp.widen)
290+
case tp: ThisType =>
291+
this(tp.cls.typeRef)
292292
case SuperType(thistpe, supertpe) =>
293293
SuperType(this(thistpe), this(supertpe))
294294
case ExprType(rt) =>

0 commit comments

Comments
 (0)