leo/tests/pass/parse/mutability/circuit.leo

9 lines
126 B
Plaintext
Raw Normal View History

2021-03-03 20:59:24 +03:00
// Circuits are immutable by default.
circuit Foo {
x: u32
}
function main() {
const a = Foo { x: 1 };
2021-03-03 20:59:24 +03:00
a.x = 0;
}