leo/tests/compiler/mutability/circuit_fail.leo

14 lines
164 B
Plaintext
Raw Normal View History

2021-05-03 17:28:53 +03:00
/*
namespace: Compile
expectation: Fail
*/
2020-07-17 06:47:47 +03:00
circuit Foo {
x: u32;
}
2021-05-03 17:28:53 +03:00
// const variable is immutable
function main() {
const a = Foo { x: 1 };
2020-07-17 22:59:18 +03:00
a.x = 0;
}