opshin
opshin copied to clipboard
Comparison chaining evaluates values several times
Currently comparison chaining is internally just rewritten such that x < y < z
becomes x < y and y < z
. In the case where y
is not a constant, this actually breaks the semantics of python which state that the inner value should only be computed once. It does not matter here, since the only side effect is tracing - but should still be fixed also for reducing computation cost
Bug bounty: 500 ADA