Debian Codegraph @

tests/spec/unit/regression/absent_id_crash.mzn

raw
1 /***
2 !Test
3 expected: !Result
4 solution: !Solution
5 z: [null, null]
6 ***/
7
8 % Crashes due to assuming ids have a decl, when <> does not.
9
10 array [1..2] of var 0..1: x = [0, 0];
11 array [1..1] of var 1..1: y;
12
13 array [1..2] of var opt 1..1: z :: add_to_output = [y[x[i]] | i in 1..2 where x[i] != 0];