Files
kotlin-fork/js/js.translator/testData/wasmBox/passedCommonTests/controlStructures/ifConst1.kt
T
Svyatoslav Kuzmich 6e6ffa12a6 [WASM] Initial infrastructure
- New module ":compiler:backend.wasm"
    - Initial compiler infra (driver, phaser, context)
    - Subset of Wasm AST
    - Skeleton of IR -> Wasm AST
    - Wasm AST -> WAT transformer

- Testing infra

- SpiderMonkey jsshell tool
2019-08-22 15:59:54 +03:00

20 lines
474 B
Kotlin
Vendored

fun foo(b: Boolean): String {
return if (b) {
"OK"
} else if (false) {
"fail: reached unreachable code at line 5"
} else if (true) {
"fail: reached unexpected code at line 7"
} else if (true) {
"fail: reached unreachable code at line 9"
} else if (b) {
"fail: reached unreachable code at line 11"
} else {
"fail: reached unreachable code at line 13"
}
}
fun box(): String {
return foo(true)
}