Skip to content

Error in stdlib_math: mzn_in_root_context used outside of predicate #942

@zsmooter

Description

@zsmooter

Here's a fairly minimal example that triggers this error:

function list of var int: func(var int: x) = [x div x];
any: test_var = [func(1)];

This is the output when running:

Running error_test.mzn
error_test:2.1-13
  in variable declaration for 'test_var'
stdlib_math:192.6-26
  in call 'mzn_in_root_context'
MiniZinc: evaluation error: mzn_in_root_context used outside of predicate
Process finished with non-zero exit code 1.
Finished in 215msec.

Tested on 2.9.3 and 2.9.4 "edge" build in MiniZinc Playground

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugresolvedIssue is resolved and the feature or fix will be part of next release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions