Debian Codegraph @

tests/spec/unit/regression/github_828.mzn

raw
1 /***
2 !Test
3 solvers: [gecode]
4 expected: !Error
5 type: TypeError
6 ***/
7
8 int: NUM_W=2;
9 int: NUM_A=1;
10 int: NUM_B=1;
11
12 enum W = C(1..NUM_W);
13
14 enum A = P({ to_enum(W, c) | c in 1..NUM_A });
15
16 enum B = S({ to_enum(W, NUM_A+c) | c in 1..NUM_B });
17
18 output[show(W) ++ "\n"]; % {C(1), C(2)}
19 output[show(A) ++ "\n"]; % {P(C(1))}
20 output[show(B) ++ "\n"]; % {S(C(2))}
21 output[show((to_enum(A, 1))) ++ "\n"]; % P(C(1))
22 output[show(to_enum(W, 1) in A) ++ "\n"]; % true <- makes sense
23 output[show(to_enum(W, 1) in B) ++ "\n"]; % true <- WHY???