Skip to content

Commit f9e5b6a

Browse files
committed
internal/core/adt: fix bug in bound simplification
SimplifyBounds orders BoundValues in order to simplify the operation. However, in doing so it swapped the original values, but not the derivative values xv and yv, causing these to be misaligned. Also, we missed an opportunity to detect a failing bound for integer values, namely >m & <n where n == m+1. This also changes when n.*Bound is set to nil. This seems to have no effect, but it could help not losing an error position. This fix helps disjunctions fail earlier, improving performance, although, of course, this should not be relied on solely to handle disjunctions efficiently. Issue #2850 Issue #3610 Signed-off-by: Marcel van Lohuizen <[email protected]> Change-Id: I2eca009ae314193d416a2890241a25744d562a39 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1205397 TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]> Reviewed-by: Matthew Sackman <[email protected]>
1 parent 00fa80a commit f9e5b6a

File tree

4 files changed

+903
-11
lines changed

4 files changed

+903
-11
lines changed

0 commit comments

Comments
 (0)