When wrapping a divide-by-zero assertion statement inside a function, the compiler crashes.
Environment
Compiler version: 0.8.7
Operating system: Ubuntu 22.04
Steps to Reproduce
Save the following file into buggy_inline.zok:
def foo(field a, field b) -> field {
assert(1 / (a - b) == 0);
return a;
}
def main() -> field {
return foo(1, 1);
}
Compile:
zokrates compile -i buggy_inline.zok
and observe the following output:
The compiler unexpectedly panicked
panicked at 'called `Option::unwrap()` on a `None` value', zokrates_field/src/bn128.rs:4:1
This is unexpected, please submit a full bug report at https://github.com/Zokrates/ZoKrates/issues
make: *** [Makefile:8: out] Error 101
Description
When wrapping a divide-by-zero assertion statement inside a function, the compiler crashes.
Environment
Steps to Reproduce
Save the following file into
buggy_inline.zok
:Compile:
and observe the following output: