mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-25 03:04:13 +03:00
21 lines
293 B
Plaintext
21 lines
293 B
Plaintext
/*
|
|
namespace: Compile
|
|
expectation: Pass
|
|
*/
|
|
|
|
function main() {
|
|
let f = Foo { a: 0u32 };
|
|
|
|
f.bar();
|
|
}
|
|
|
|
circuit Foo {
|
|
a: u32
|
|
|
|
function bar(mut self) {
|
|
if true {
|
|
self.a = 5u32; // Mutating a variable inside a conditional statement should work.
|
|
}
|
|
}
|
|
}
|