1
0
Fork 0
mirror of synced 2025-09-24 04:40:05 +00:00
ZoKrates/zokrates_cli/examples/book/numeric_inference.zok
2020-09-29 09:56:07 +02:00

9 lines
No EOL
249 B
Text

def main():
// `255` is infered to `255f`, and the addition happens between field elements
assert(255 + 1f == 256)
// `255` is infered to `255u8`, and the addition happens between u8
// This causes an overflow
assert(255 + 1u8 == 0)
return