leo/compiler/tests/statements/conditional/nested.leo

12 lines
173 B
Plaintext
Raw Normal View History

2020-07-31 03:11:58 +03:00
function main(a: bool, b: bool, c: u32) {
let mut d = 0u32;
2020-06-13 13:39:51 +03:00
2020-07-17 22:59:18 +03:00
if a {
2020-07-31 03:11:58 +03:00
d += 1;
2020-07-17 22:59:18 +03:00
if b {
2020-07-31 03:11:58 +03:00
d += 2;
2020-07-17 22:59:18 +03:00
}
2020-06-13 13:39:51 +03:00
}
2020-08-17 03:20:47 +03:00
console.assert(d == c);
2020-06-13 13:39:51 +03:00
}