You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: compiler/src/dotty/tools/dotc/core/TypeComparer.scala
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1945,8 +1945,11 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
1945
1945
valtparam= tr.symbol
1946
1946
gadts.println(i"narrow gadt bound of $tparam: ${tparam.info} from ${if (isUpper) "above"else"below"} to $bound${bound.toString}${bound.isRef(tparam)}")
1947
1947
if (bound.isRef(tparam)) false
1948
-
elseif (isUpper) gadtAddUpperBound(tparam, bound)
1949
-
else gadtAddLowerBound(tparam, bound)
1948
+
else
1949
+
valsavedGadt= ctx.gadt.fresh
1950
+
valsuccess=if isUpper then gadtAddUpperBound(tparam, bound) else gadtAddLowerBound(tparam, bound)
0 commit comments