1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00
ZoKrates/zokrates_cli/examples/book/shadowing.zok
2022-07-26 14:18:08 +01:00

9 lines
203 B
Text

def main() -> field {
field a = 2;
field a = 3; // shadowing
for u32 i in 0..5 {
bool a = true; // shadowing
}
// `a` is the variable declared before the loop
return a;
}