const f = true in 3..2 will make it to the evaluation stage even though it should result in
Error: value type and array element type in range differ
╭─[test.pnt:7:22]
│
7 │ const f = true in [1, 2];
│ ┬
│ ╰── array element type mismatch; expecting `bool` type, found `int` type
───╯
...
A user can still write const f = true in 3..2; without an error occurring before this stage.
FWIW, if it is not a const then we type check the range. Ex.
predicate Test {
var l = true in 1..2;
}
Error: value type and range type differ
╭─[test.pnt:18:21]
│
18 │ var l = true in 1..2;
│ ┬
│ ╰── range type mismatch; expecting `bool` type, found `int` type
────╯
const f = true in 3..2
will make it to the evaluation stage even though it should result in