1
0
mirror of https://github.com/fluencelabs/assemblyscript synced 2025-06-22 03:01:55 +00:00
Files
assemblyscript/tests/compiler/if.ts
2017-12-02 18:37:59 +01:00

23 lines
318 B
TypeScript

export function ifThenElse(n: i32): bool {
if (n)
return true;
else
return false;
}
export function ifThen(n: i32): bool {
if (n)
return true;
return false;
}
export function ifThenElseBlock(n: i32): bool {
if (n) {
; // nop
return true;
} else {
; // nop
return false;
}
}