git-subtree-dir: software/minizinc git-subtree-split: 4f10c82056ffcb1041d7ffef29d77a7eef92cf76
29 lines
745 B
MiniZinc
29 lines
745 B
MiniZinc
/***
|
|
!Test
|
|
expected:
|
|
- !Error
|
|
- !Result # TODO: Remove when bug is fixed
|
|
status: SATISFIED
|
|
***/
|
|
|
|
% Regression test for bug #220. The assignment of the let-variable 'capacity'
|
|
% below should result in an error message being produced during flattening
|
|
% because there are different array indexes on the LHS and RHS.
|
|
% mzn2fzn 1.3.1 and before do not detect this and instead produced an array
|
|
% with an incorrect index set.
|
|
|
|
int: K = 3;
|
|
int: R = 3;
|
|
|
|
constraint
|
|
forall ( k in 1..K, j in 1..R)
|
|
(let {
|
|
array[0..K] of int: capacity = [100000] ++ [k | k in 1..K]
|
|
}
|
|
in
|
|
trace( show(capacity) ++ " " ++ show(min(index_set(capacity))) ++"\n",
|
|
true)
|
|
);
|
|
|
|
solve satisfy;
|