leo/compiler/tests/mutability/circuit.leo

9 lines
118 B
Plaintext
Raw Normal View History

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