Skip to content

Commit 2ed3c1c

Browse files
fix constraints merging of non-constant bounds
Before, something like `read_int("x", 0, n)` would print the minimum seen value for `n` in the output range for x, instead of the maximum value. That leads to confusing messages such as: 0 <= x <= 2 WARNING: upper bound not reached. max value 999. or even 1000 <= x <= 0
1 parent ae89320 commit 2ed3c1c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/validate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ def _merge_constraints(constraints_path: Path, constraints: ConstraintsDict):
5353
vmin = c[3]
5454
if c[4] > vmax:
5555
vmax = c[4]
56-
if c[5] > low:
56+
if c[5] < low:
5757
low = c[5]
58-
if c[6] < high:
58+
if c[6] > high:
5959
high = c[6]
6060
constraints[loc] = (name, has_low, has_high, vmin, vmax, low, high)
6161

0 commit comments

Comments
 (0)