Files
hakorune/apps/tests/mir-compare-multi/main.hako

15 lines
354 B
Plaintext

// mir-compare-multi - exercise Compare ops under JIT-direct
static box Main {
main() {
local c = 0
if 1 < 2 { c = c + 1 } // true
if 2 < 1 { c = c + 10 } // false (unchanged)
if 5 == 5 { c = c + 100 } // true
if 7 != 7 { c = c + 1000 } // false
// Expect 1 + 100 = 101
return c
}
}