Debian Codegraph @

tests/spec/unit/regression/github_802.mzn

raw
1 /***
2 !Test
3 solvers: [gecode]
4 options:
5 all_solutions: true
6 keep-paths: true
7 expected: !Result
8 status: ALL_SOLUTIONS
9 solution: !SolutionSet
10 - !Solution
11 i: 1
12 x: 5
13 - !Solution
14 i: 2
15 x: 10
16 ***/
17
18 % Previously the generated array accesses for a[i].a and a[i].b had the same
19 % paths so would get incorrectly unified.
20
21 any: a = [(a: 16, b: 2), (a: 8, b: 1)];
22 var 1..2: i;
23 any: x :: output = 10 div a[i].b;