tests/spec/unit/regression/github_902b.mzn
raw| 1 | /*** |
| 2 | !Test |
| 3 | solvers: [gecode] |
| 4 | expected: !Error |
| 5 | type: TypeError |
| 6 | ***/ |
| 7 | |
| 8 | list of tuple( |
| 9 | int, |
| 10 | array[1..1] of opt 1.. |
| 11 | ): A = [ |
| 12 | (1, [ <> ]), |
| 13 | ]; |
| 14 | |
| 15 | list of tuple( |
| 16 | int, |
| 17 | array[1..1] of 0.. |
| 18 | ): B = A ++ [ |
| 19 | (1, [ 0 ]), |
| 20 | ]; |
| 21 | |
| 22 | array[int, int] of int: T = |
| 23 | array2d(1..2, 1..2, |
| 24 | [ ([ tp.1, ] ++ tp.2)[j] |
| 25 | | tp in B, j in 1..2 ]); |
| 26 | |
| 27 | output join("\n", [ |
| 28 | "A:\(A)", |
| 29 | "B:\(B)", |
| 30 | "T:\(T)", |
| 31 | ]); |