Open MadeByMars opened 4 years ago
The problem here is that the Ivy if-then-else and logical operators are not 'short-circuiting'. This means that the call to node.next
occurs whether the condition node.is_max(self)
is true or false.
My intention is to change this in the next version of the language. I will leave this issue open until then. Meanwhile, you have to work around the issue, as shown above.
I wrote something like
Ivy complains that
ivy/include/1.7/order.ivy: line 92: guarantee ... FAIL
. That assertion isassert exists S. S > x;
Once I change it to:
it passes.
I guess the condition may not be correctly instantiated in if-expression.