aboutsummaryrefslogtreecommitdiff
path: root/src/dotty
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-05-26 13:19:04 +0200
committerMartin Odersky <odersky@gmail.com>2015-06-06 11:04:54 +0200
commiteaf3095494af2b0ea028452450a6af44e27f5284 (patch)
tree505da68a0b6779afab0940c7748f2cbec91c348d /src/dotty
parent3d241f3ddbb1d364d163612f643adb57b355f554 (diff)
downloaddotty-eaf3095494af2b0ea028452450a6af44e27f5284.tar.gz
dotty-eaf3095494af2b0ea028452450a6af44e27f5284.tar.bz2
dotty-eaf3095494af2b0ea028452450a6af44e27f5284.zip
Disable deskolemization in narrowGADTBounds
Will use deskolemize later, when method result types are inferred.
Diffstat (limited to 'src/dotty')
-rw-r--r--src/dotty/tools/dotc/core/TypeComparer.scala9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/core/TypeComparer.scala b/src/dotty/tools/dotc/core/TypeComparer.scala
index 692f05d5a..e90c30025 100644
--- a/src/dotty/tools/dotc/core/TypeComparer.scala
+++ b/src/dotty/tools/dotc/core/TypeComparer.scala
@@ -641,13 +641,12 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling wi
private def narrowGADTBounds(tr: NamedType, bound: Type, isUpper: Boolean): Boolean =
ctx.mode.is(Mode.GADTflexible) && {
val tparam = tr.symbol
- val bound1 = deSkolemizeIfSkolemsSeen(bound, toSuper = !isUpper)
- typr.println(s"narrow gadt bound of $tparam: ${tparam.info} from ${if (isUpper) "above" else "below"} to $bound1 ${bound1.isRef(tparam)}")
- !bound1.isRef(tparam) && {
+ typr.println(s"narrow gadt bound of $tparam: ${tparam.info} from ${if (isUpper) "above" else "below"} to $bound ${bound.isRef(tparam)}")
+ !bound.isRef(tparam) && {
val oldBounds = ctx.gadt.bounds(tparam)
val newBounds =
- if (isUpper) TypeBounds(oldBounds.lo, oldBounds.hi & bound1)
- else TypeBounds(oldBounds.lo | bound1, oldBounds.hi)
+ if (isUpper) TypeBounds(oldBounds.lo, oldBounds.hi & bound)
+ else TypeBounds(oldBounds.lo | bound, oldBounds.hi)
isSubType(newBounds.lo, newBounds.hi) &&
{ ctx.gadt.setBounds(tparam, newBounds); true }
}