leo/tests/compiler/mutability/let_mut.leo

14 lines
217 B
Plaintext
Raw Normal View History

2021-05-03 16:47:33 +03:00
/*
namespace: Compile
2021-05-05 18:29:44 +03:00
expectation: Pass
input_file: input/dummy.in
2021-05-03 16:47:33 +03:00
*/
// Adding the `mut` keyword makes a variable mutable.
function main(y: bool) -> bool {
let a = 1u32;
2020-07-17 22:59:18 +03:00
a = 0;
return a == 0u32 == y;
2021-05-05 18:29:44 +03:00
}