diff options
author | Martin Odersky <odersky@gmail.com> | 2014-10-24 18:13:13 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-10-26 16:24:01 +0100 |
commit | a426e9280aa7ed3dbad923a8b2110b6a1a281771 (patch) | |
tree | a6449f1b154821ca267acc0301ec4c9bc4242bfa | |
parent | 651ff01e07b90c481e30afdd1500f617d74aeeb4 (diff) | |
download | dotty-a426e9280aa7ed3dbad923a8b2110b6a1a281771.tar.gz dotty-a426e9280aa7ed3dbad923a8b2110b6a1a281771.tar.bz2 dotty-a426e9280aa7ed3dbad923a8b2110b6a1a281771.zip |
Fixes erasure of super
- supertype components needs to be recursively erased
Without this fix, some files do not pass -Ycheck:lambdaLift
-rw-r--r-- | src/dotty/tools/dotc/TypeErasure.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/TypeErasure.scala b/src/dotty/tools/dotc/TypeErasure.scala index 50aaafc82..851be7658 100644 --- a/src/dotty/tools/dotc/TypeErasure.scala +++ b/src/dotty/tools/dotc/TypeErasure.scala @@ -258,8 +258,10 @@ class TypeErasure(isJava: Boolean, isSemi: Boolean, isConstructor: Boolean, wild else this(parent) case tp: TermRef => this(tp.widen) - case ThisType(_) | SuperType(_, _) => + case ThisType(_) => tp + case SuperType(thistpe, supertpe) => + SuperType(this(thistpe), this(supertpe)) case ExprType(rt) => MethodType(Nil, Nil, this(rt)) case tp: TypeProxy => |