tests/spec/unit/regression/overloading.mzn
raw| 1 | /*** |
| 2 | !Test |
| 3 | expected: |
| 4 | - !Result |
| 5 | solution: !Solution |
| 6 | b1: false |
| 7 | b2: true |
| 8 | ***/ |
| 9 | |
| 10 | % bug #1: the overloading was being handled wrongly, giving the wrong output |
| 11 | % "b = true". |
| 12 | predicate foo(set of int: x) = true; |
| 13 | predicate foo(int: x) = false; |
| 14 | var bool: b1 :: add_to_output = foo(3); |
| 15 | var bool: b2 :: add_to_output = foo({42}); |
| 16 | solve satisfy; |
| 17 | output ["b1 = ", show(b1), "; b2 = ", show(b2), "\n"]; |