tests/spec/unit/regression/test_github_30.mzn
raw| 1 | /*** |
| 2 | !Test |
| 3 | expected: |
| 4 | - !Result |
| 5 | solution: !Solution |
| 6 | X: |
| 7 | - [3, 0, 0, 0] |
| 8 | - [3, 0, 0, 0] |
| 9 | - !Result |
| 10 | solution: !Solution |
| 11 | X: |
| 12 | - [3, 10, 10, 10] |
| 13 | - [3, 10, 10, 10] |
| 14 | ***/ |
| 15 | |
| 16 | set of int: smallset = 0..10; |
| 17 | array[1..2, 1..4] of var smallset: X; |
| 18 | constraint forall( i in 1..2 ) ( |
| 19 | let { |
| 20 | array[int] of var smallset: Y = row(X, i); |
| 21 | } in |
| 22 | Y[1] == 3 % Any use of Y triggers the issue. |
| 23 | ); |
| 24 | solve satisfy; |