@@ -11,6 +11,7 @@ import config.Config
11
11
import config .Printers .constr
12
12
import reflect .ClassTag
13
13
import Constraint .ReverseDeps
14
+ import Substituters .SubstParamMap
14
15
import annotation .tailrec
15
16
import annotation .internal .sharable
16
17
import cc .{CapturingType , derivedCapturingType }
@@ -411,7 +412,6 @@ class OrderingConstraint(private val boundsMap: ParamBounds,
411
412
tvars.copyToArray(entries1, nparams)
412
413
newConstraint(boundsMap = this .boundsMap.updated(poly, entries1))
413
414
.init(poly)
414
- .adjustDeps(poly, entries1, add = true )
415
415
}
416
416
417
417
/** Split dependent parameters off the bounds for parameters in `poly`.
@@ -433,7 +433,8 @@ class OrderingConstraint(private val boundsMap: ParamBounds,
433
433
todos.dropInPlace(1 )
434
434
i += 1
435
435
}
436
- current.checkWellFormed()
436
+ current.adjustDeps(poly, current.boundsMap(poly).nn, add = true )
437
+ .checkWellFormed()
437
438
}
438
439
439
440
// ---------- Updates ------------------------------------------------------------
@@ -609,11 +610,10 @@ class OrderingConstraint(private val boundsMap: ParamBounds,
609
610
current = lowerLens.map(this , current, hi, removeParam)
610
611
611
612
current.foreachParam { (p, i) =>
612
- current = boundsLens.map(this , current, p, i,
613
- entry =>
614
- val newEntry = replaceParam(entry, p, i)
615
- adjustDeps(newEntry, entry, p.paramRefs(i))
616
- newEntry)
613
+ val other = p.paramRefs(i)
614
+ val oldEntry = current.entry(other)
615
+ val newEntry = current.ensureNonCyclic(other, oldEntry.substParam(param, replacement))
616
+ current = updateEntryNoOrdering(current, other, newEntry, oldEntry)
617
617
}
618
618
current.dropDeps(param)
619
619
current.checkWellFormed()
0 commit comments