When using <= in assert, I get a compilation error:
The compiler unexpectedly panicked
panicked at 'assertion failed: res.len() <= to', zokrates_codegen/src/lib.rs:2020:21
This does not happen for <, >, or >=.
Environment
Compiler version: 0.8.5, 0.8.6
Operating system: macOS 13.1
Steps to Reproduce
def main(u32 n) {
assert(n <= 5);
return;
}
Compiling this code returns the error above. assert(n < 5) does not trigger the same error. Changing the type of n to field also does not trigger the error. assert(n <= 5 ? true : false) works as a workaround.
Description
When using
<=
inassert
, I get a compilation error:This does not happen for
<
,>
, or>=
.Environment
Steps to Reproduce
Compiling this code returns the error above.
assert(n < 5)
does not trigger the same error. Changing the type ofn
tofield
also does not trigger the error.assert(n <= 5 ? true : false)
works as a workaround.