libminizinc
libminizinc copied to clipboard
Overloading functions causes collision when using record Type-inst
Take the following simple model.
% Works
test valid(record(int:x): x) = true;
test valid(record(int:y): x) = true;
% Doesn't work
type rx = record(int:x);
type ry = record(int:y);
test valid_tr(ry: x) = true;
test valid_tr(rx: x) = true;
Using type-inst it's not possible to overload a function for different record types.
Behavior seen in 2.7.6 and by the looks of it, also in latest/development.
Here's an example in the MiniZinc playground
Fails with
Playground.mzn:9.1-27:
MiniZinc:
type error: function with the same type already defined in /minizinc/Playground.mzn:8.1-27
Process finished with non-zero exit code 1.