aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/TypeErasure.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-11-08 12:05:54 +0100
committerMartin Odersky <odersky@gmail.com>2014-11-09 19:09:52 +0100
commita8cd662ce26e915fb045bfd34b7ac9aa88f69721 (patch)
treebdad10b6f6c5deeb280752b24382716cfaa87aa6 /src/dotty/tools/dotc/TypeErasure.scala
parentdf0229e4754e8d512aef68c7d2ffbd1d79cb5df5 (diff)
downloaddotty-a8cd662ce26e915fb045bfd34b7ac9aa88f69721.tar.gz
dotty-a8cd662ce26e915fb045bfd34b7ac9aa88f69721.tar.bz2
dotty-a8cd662ce26e915fb045bfd34b7ac9aa88f69721.zip
Fixed handling of ThisTypes in TypeErasure.
Need to be treated like TermRefs.
Diffstat (limited to 'src/dotty/tools/dotc/TypeErasure.scala')
-rw-r--r--src/dotty/tools/dotc/TypeErasure.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/TypeErasure.scala b/src/dotty/tools/dotc/TypeErasure.scala
index 448dd3f57..4a492560f 100644
--- a/src/dotty/tools/dotc/TypeErasure.scala
+++ b/src/dotty/tools/dotc/TypeErasure.scala
@@ -108,6 +108,8 @@ object TypeErasure {
case tp: TermRef =>
assert(tp.symbol.exists, tp)
TermRef(erasedRef(tp.prefix), tp.symbol.asTerm)
+ case tp: ThisType =>
+ tp
case tp =>
erasure(tp)
}
@@ -271,7 +273,7 @@ class TypeErasure(isJava: Boolean, isSemi: Boolean, isConstructor: Boolean, wild
case tp: TermRef =>
this(tp.widen)
case ThisType(_) =>
- tp
+ this(tp.widen)
case SuperType(thistpe, supertpe) =>
SuperType(this(thistpe), this(supertpe))
case ExprType(rt) =>