aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-03-06 10:11:36 +0100
committerMartin Odersky <odersky@gmail.com>2014-03-07 11:12:33 +0100
commit9e25a624516186b606fcd734dd1b066e1204ca79 (patch)
treeba49b4db6f1b7562c92995a521b24f8bf040e98c
parentc3ba4feaa424d6bdcc2b5bfaf6fd87b5fc815bdb (diff)
downloaddotty-9e25a624516186b606fcd734dd1b066e1204ca79.tar.gz
dotty-9e25a624516186b606fcd734dd1b066e1204ca79.tar.bz2
dotty-9e25a624516186b606fcd734dd1b066e1204ca79.zip
Fix of accidental omission in TypeComparer
-rw-r--r--src/dotty/tools/dotc/core/TypeComparer.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/TypeComparer.scala b/src/dotty/tools/dotc/core/TypeComparer.scala
index ffb20cbad..da8263ac1 100644
--- a/src/dotty/tools/dotc/core/TypeComparer.scala
+++ b/src/dotty/tools/dotc/core/TypeComparer.scala
@@ -715,7 +715,9 @@ class TypeComparer(initctx: Context) extends DotClass {
/** Two types are the same if are mutual subtypes of each other */
def isSameType(tp1: Type, tp2: Type): Boolean =
- isSubType(tp1, tp2) && isSubType(tp2, tp1)
+ if (tp1 eq NoType) false
+ else if (tp1 eq tp2) true
+ else isSubType(tp1, tp2) && isSubType(tp2, tp1)
/** Same as `isSameType` but also can be applied to overloaded TermRefs, where
* two overloaded refs are the same if they have pairwise equal alternatives