File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -641,13 +641,12 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling wi
641
641
private def narrowGADTBounds (tr : NamedType , bound : Type , isUpper : Boolean ): Boolean =
642
642
ctx.mode.is(Mode .GADTflexible ) && {
643
643
val tparam = tr.symbol
644
- val bound1 = deSkolemizeIfSkolemsSeen(bound, toSuper = ! isUpper)
645
- typr.println(s " narrow gadt bound of $tparam: ${tparam.info} from ${if (isUpper) " above" else " below" } to $bound1 ${bound1.isRef(tparam)}" )
646
- ! bound1.isRef(tparam) && {
644
+ typr.println(s " narrow gadt bound of $tparam: ${tparam.info} from ${if (isUpper) " above" else " below" } to $bound ${bound.isRef(tparam)}" )
645
+ ! bound.isRef(tparam) && {
647
646
val oldBounds = ctx.gadt.bounds(tparam)
648
647
val newBounds =
649
- if (isUpper) TypeBounds (oldBounds.lo, oldBounds.hi & bound1 )
650
- else TypeBounds (oldBounds.lo | bound1 , oldBounds.hi)
648
+ if (isUpper) TypeBounds (oldBounds.lo, oldBounds.hi & bound )
649
+ else TypeBounds (oldBounds.lo | bound , oldBounds.hi)
651
650
isSubType(newBounds.lo, newBounds.hi) &&
652
651
{ ctx.gadt.setBounds(tparam, newBounds); true }
653
652
}
You can’t perform that action at this time.
0 commit comments