leo/compiler/tests/mutability/circuit.leo

9 lines
126 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() {
const a = Foo { x: 1 };
2020-07-17 22:59:18 +03:00
a.x = 0;
}