leo/tests/compiler/circuits/mut_variable.leo
2021-05-12 20:02:03 +03:00

23 lines
251 B
Plaintext

/*
namespace: Compile
expectation: Pass
*/
circuit Foo {
a: u8;
}
function main() {
let f = Foo { a: 0u8 };
console.assert(f.a == 0u8);
f.a = 1u8;
console.assert(f.a == 1u8);
f.a = 2u8;
console.assert(f.a == 2u8);
}