Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information