mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-22 17:11:42 +03:00
24 lines
359 B
Plaintext
24 lines
359 B
Plaintext
/*
|
|
namespace: Compile
|
|
expectation: Pass
|
|
input_file: input/dummy.in
|
|
*/
|
|
|
|
function main(y: bool) -> bool {
|
|
let f = Foo { a: 0u32 };
|
|
|
|
f.bar();
|
|
|
|
return y == true;
|
|
}
|
|
|
|
circuit Foo {
|
|
a: u32;
|
|
|
|
function bar(mut self) {
|
|
if true {
|
|
self.a = 5u32; // Mutating a variable inside a conditional statement should work.
|
|
}
|
|
}
|
|
}
|