Closed
Description
Hi,
I would like to add some assertions to a function that returns "array[int,int] of int" (in reality, an adjacency matrix).
function array[int, int] of int: doSomething(array[int, int] of int: edges) =
assert(true,
"This should work",
edges);
output[ "\(doSomething([| 5, 3, 5 | 1, 2, 3 |]))" ];
solve satisfy;
which does not work and returns:
MiniZinc: type error: no function or predicate with this signature found: `assert(bool,string,array[int,int] of int)'
However, when doing the same with just an int, everything's fine:
function int: doSomething(int: e) =
assert(true,
"This should work",
e);
output[ "\(doSomething(5))" ];
solve satisfy;
Is there a workaround?
Cheers,
Alex
Metadata
Metadata
Assignees
Labels
No labels