leo/tests/compiler/mutability/circuit_variable_mut.leo
2021-05-05 18:29:44 +03:00

18 lines
237 B
Plaintext

/*
namespace: Compile
expectation: Pass
input_file: input/dummy.in
*/
circuit Foo {
x: u32
}
// Using let makes a circuit variable mutable.
function main() -> bool{
let a = Foo { x: 1 };
a.x = 0;
return a.x == 0u32;
}