llvm: extend If PHI hygiene smoke with multi-branch + guard chain case

This commit is contained in:
Selfhosting Dev
2025-09-20 02:02:08 +09:00
parent a5a57e3d8b
commit ec7d8ab726
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,11 @@
local x = 5
if (x < 0) {
print(-1)
} else if (x < 3) {
print(0)
} else if ((x < 10) && x.is("Integer")) {
print(1)
} else {
print(2)
}

View File

@ -44,6 +44,7 @@ check_case "apps/tests/macro_golden_if_assign.nyash"
check_case "apps/tests/macro_golden_if_print.nyash"
check_case "apps/tests/macro_golden_if_return.nyash"
check_case "apps/tests/macro_golden_type_is_basic.nyash"
check_case "apps/tests/macro_golden_if_chain_guard.nyash"
if [ "$fails" -ne 0 ]; then
exit 2