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

14 lines
163 B
Plaintext

/*
namespace: Compile
expectation: Fail
*/
circuit Foo {
x: u32
}
// const variable is immutable
function main() {
const a = Foo { x: 1 };
a.x = 0;
}