tests/spec/unit/regression/github_919.mzn
raw| 1 | /*** |
| 2 | !Test |
| 3 | solvers: [gecode] |
| 4 | expected: !Result |
| 5 | - !Solution |
| 6 | x: 1 |
| 7 | ***/ |
| 8 | |
| 9 | % Previously the compiler would generate an invalid par version of foo() |
| 10 | % because the type of t was seen as par instead of containing var members |
| 11 | |
| 12 | var 1..2: v; |
| 13 | tuple(var int, int): t = (v, 1); |
| 14 | |
| 15 | function var int: bar(var int: x) = 1; |
| 16 | function int: bar(int: x) = 2; |
| 17 | |
| 18 | function var int: foo() = bar(t.1); |
| 19 | var int: x :: output = foo(); |
| 20 | |
| 21 | solve minimize v; |