Files
kotlin-fork/js/js.translator/testData/box/expression/misc/throwThrow.kt
T
2017-07-19 12:24:09 +03:00

17 lines
283 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 999
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"
}