leo/compiler/tests/mutability/circuit.leo

9 lines
124 B
Plaintext
Raw Normal View History

// Circuits are immutable by default.
2020-07-17 06:47:47 +03:00
circuit Foo {
2020-07-17 22:59:18 +03:00
x: u32
}
function main() {
2020-07-17 22:59:18 +03:00
let a = Foo { x: 1 };
a.x = 0;
}