Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Function: invalid type error message for array index when comparing 1..n and set of int #131
I got an unexpected error when formulating my own function that returns a two-dimensional variable array, and I'm wondering if it is intentional. Let's say we are given the following two arrays that have differing first ranges, but share the second range (
However, this results in the (not very helpful) error message: "MiniZinc: type error: invalid type in array index, expected 'set of int', actual 'set of int'". I presume this is because the type inst of
This might be expected behaviour and documented somewhere, however, it might be useful to adapt the error message so that users understand the actual problem (and realise that it is not a bug in MiniZinc). I attached a MiniZinc model that reproduces the error as text file.