tests/spec/unit/regression/comprehension_where.mzn
raw| 1 | /*** |
| 2 | !Test |
| 3 | expected: !Result |
| 4 | status: SATISFIED |
| 5 | ***/ |
| 6 | |
| 7 | % Used to give UNSATISFIABLE due to introducing a call for the array comprehension. |
| 8 | |
| 9 | array [1..1] of var 0..1: x; |
| 10 | array [1..1] of var 1..1: y; |
| 11 | |
| 12 | constraint absent(z[1]); |
| 13 | |
| 14 | array [1..1] of var opt 1..1: z = [y[x[i]] | i in 1..1 where x[i] != 0]; |