Files
kotlin-fork/js/js.translator/testData/box/expression/misc/throwThrow.kt
T
2018-04-19 13:17:28 +03:00

18 lines
309 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
// EXPECTED_REACHABLE_NODES: 1117
package foo
fun test() {
throw throw Exception("catch me")
}
fun box(): String {
try {
test()
error("exception not thrown")
}
catch (e: Exception) {
assertEquals("catch me", e.message)
}
return "OK"
}