1
0
This repository has been archived on 2025-03-06. You can view files and clone it, but cannot push or open issues or pull requests.
Jip J. Dekker fad1b07018 Squashed 'software/minizinc/' content from commit 4f10c8205
git-subtree-dir: software/minizinc
git-subtree-split: 4f10c82056ffcb1041d7ffef29d77a7eef92cf76
2021-06-16 14:06:46 +10:00

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;