File tree 1 file changed +8
-5
lines changed
compiler/src/dotty/tools/dotc/core
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -2014,13 +2014,16 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
2014
2014
case TypeRef (q : PathType , _) => (path eq q) && bound.isRef(sym)
2015
2015
case _ => false
2016
2016
2017
- isConstrainable && {
2018
- gadts.println(i " narrow gadt bound of pdt $path -> ${sym}: from ${if (isUpper) " above" else " below" } to $bound ${bound.toString} ${isRef}" )
2017
+ rollbackGadtUnless {
2018
+ isConstrainable && {
2019
+ gadts.println(i " narrow gadt bound of pdt $path -> ${sym}: from ${if (isUpper) " above" else " below" } to $bound ${bound.toString} ${isRef}" )
2019
2020
2020
- if isRef then false
2021
- else if isUpper then gadtAddUpperBound(path, sym, bound)
2022
- else gadtAddLowerBound(path, sym, bound)
2021
+ if isRef then false
2022
+ else if isUpper then gadtAddUpperBound(path, sym, bound)
2023
+ else gadtAddLowerBound(path, sym, bound)
2024
+ }
2023
2025
}
2026
+
2024
2027
case _ => false
2025
2028
2026
2029
narrowTypeParams || narrowPathDepType
You can’t perform that action at this time.
0 commit comments