Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug, MiniZinc: type error: ambiguous overloading on return type of function #875

Open
CervEdin opened this issue Jan 30, 2025 · 1 comment

Comments

@CervEdin
Copy link

CervEdin commented Jan 30, 2025

I think this might be a bug

set of int: X = {1,3,5} diff (2..5 union 1..0);
set of int: Y = {1,3,5} diff (2..5 union {});
output show([X,Y]);
Playground.mzn:2.42-43:
MiniZinc:
type error: ambiguous overloading on return type of function

On playground

Both on edge and latest (2.8.7)

@a1880
Copy link

a1880 commented Jan 31, 2025

This variant works on Playground:

set of int: emptySet = {};
set of int: X = {1,3,5} diff (2..5 union 1..0);
set of int: Y = {1,3,5} diff (2..5 union emptySet);
output show([X,Y]);

I doubt that 1..0 should be digested as empty set without warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants