diff options
author | Martin Odersky <odersky@gmail.com> | 2014-10-22 11:45:34 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-10-26 16:24:01 +0100 |
commit | e7cc8a4012b9bfc9bc6ae811b37cc468ced46ff2 (patch) | |
tree | 30ed7f9f0c00c85b91b52a02fd29370d019f8323 | |
parent | 138045cc5545519c87044147dd7bb5b14729d2d2 (diff) | |
download | dotty-e7cc8a4012b9bfc9bc6ae811b37cc468ced46ff2.tar.gz dotty-e7cc8a4012b9bfc9bc6ae811b37cc468ced46ff2.tar.bz2 dotty-e7cc8a4012b9bfc9bc6ae811b37cc468ced46ff2.zip |
Added missing case for SuperTypes to TypeComparer
-rw-r--r-- | src/dotty/tools/dotc/core/TypeComparer.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/TypeComparer.scala b/src/dotty/tools/dotc/core/TypeComparer.scala index f36572755..dcd8af3b6 100644 --- a/src/dotty/tools/dotc/core/TypeComparer.scala +++ b/src/dotty/tools/dotc/core/TypeComparer.scala @@ -515,6 +515,14 @@ class TypeComparer(initctx: Context) extends DotClass { case _ => secondTry(tp1, tp2) } + case tp2: SuperType => + tp1 match { + case tp1: SuperType => + isSubType(tp1.thistpe, tp2.thistpe) && + isSameType(tp1.supertpe, tp2.supertpe) + case _ => + secondTry(tp1, tp2) + } case AndType(tp21, tp22) => isSubType(tp1, tp21) && isSubType(tp1, tp22) case ErrorType => |