1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00
ZoKrates/zokrates_cli/examples/book/numeric_inference.zok
2022-06-21 15:03:53 +02:00

10 lines
272 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;
}