mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-23 10:12:21 +03:00
11 lines
183 B
Plaintext
11 lines
183 B
Plaintext
// Adding the `mut` keyword makes a circuit variable mutable.
|
|
circuit Foo {
|
|
x: u32;
|
|
}
|
|
|
|
function main() {
|
|
let a = Foo { x: 1 };
|
|
a.x = 0;
|
|
|
|
console.assert(a.x == 0u32);
|
|
} |