leo/asg/tests/pass/circuits/mut_self_variable_conditional.leo
2021-01-25 07:19:38 -08:00

15 lines
252 B
Plaintext

function main() {
let mut f = Foo { a: 0u32 };
f.bar();
}
circuit Foo {
a: u32
function bar(mut self) {
if true {
self.a = 5u32; // Mutating a variable inside a conditional statement should work.
}
}
}