aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-19 22:11:17 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-19 22:11:17 +0100
commit6eece756db81a62d6114ff8ce8674cc0c69febaa (patch)
tree95775bb2276601a608eda4917c842b4c2a70f8ac /src/dotty/tools/dotc/core
parent7151d0fdc960e439aa71ad3e4c69e00153c0f377 (diff)
downloaddotty-6eece756db81a62d6114ff8ce8674cc0c69febaa.tar.gz
dotty-6eece756db81a62d6114ff8ce8674cc0c69febaa.tar.bz2
dotty-6eece756db81a62d6114ff8ce8674cc0c69febaa.zip
Fix to lub: recompute if either operand can be widened
Diffstat (limited to 'src/dotty/tools/dotc/core')
-rw-r--r--src/dotty/tools/dotc/core/TypeComparer.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/TypeComparer.scala b/src/dotty/tools/dotc/core/TypeComparer.scala
index ca43784a2..631363e3e 100644
--- a/src/dotty/tools/dotc/core/TypeComparer.scala
+++ b/src/dotty/tools/dotc/core/TypeComparer.scala
@@ -645,7 +645,7 @@ class TypeComparer(initctx: Context) extends DotClass {
else {
val tp1w = tp1.widen
val tp2w = tp2.widen
- if ((tp1 ne tp1w) && (tp2 ne tp2w)) lub(tp1w, tp2w)
+ if ((tp1 ne tp1w) || (tp2 ne tp2w)) lub(tp1w, tp2w)
else orType(tp1w, tp2w) // no need to check subtypes again
}
}