Files
kotlin-fork/js/js.translator/testData/box/expression/when/whenAsExpressionWithThrow.kt
T
2018-09-12 09:49:25 +03:00

23 lines
370 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 1281
package foo
fun box(): String {
try {
(when (1) {
3 -> {
3
}
1 -> {
throw Exception()
}
else -> {
return "fail1"
}
})
} catch (e: Exception) {
return "OK"
}
return "fail2"
}