Files
2018-09-12 09:49:25 +03:00

19 lines
335 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 1282
fun test(x: Int): Any {
return try {
if (x % 2 == 0) throw RuntimeException()
x
}
catch (e: RuntimeException) {
}
}
fun box(): String {
val a = test(1)
if (a != 1) return "fail1: $a"
val b = test(2)
if (b != Unit) return "fail2: $b"
return "OK"
}