1
0
Fork 0
mirror of synced 2025-09-23 04:08:33 +00:00
ZoKrates/zokrates_cli/examples/book/conditional_panic.zok
2022-05-31 23:52:09 +02:00

7 lines
No EOL
163 B
Text

def main(field x) -> field {
return if x == 0 {
0
} else {
1 / x // executed even for x := 0, which leads to the execution failing
};
}