blob: d86fe5f0897f83894c755298931e0ced66ac67f0 [file]
// WITH_STDLIB
// FILE: lib.kt
val x = computeX()
private fun computeX() = 42
fun baz1() { }
fun baz2() { }
// FILE: main.kt
import kotlin.test.*
fun bar(x: Int) = if (x == 0) error("") else x
fun foo(x: Int) {
try {
bar(x)
baz1()
} catch (t: Throwable) { }
}
fun box(): String {
foo(0)
assertEquals(42, x)
return "OK"
}