blob: 027e656fc91f8598f82b3245f980f1d974785dfe [file]
// WITH_STDLIB
// FILE: lib.kt
inline fun runAndThrow(action: () -> Unit): Nothing {
action()
throw Exception()
}
inline fun foo(): Int = runAndThrow {
return 1
}
// FILE: main.kt
import kotlin.test.*
fun box(): String {
val result: Any = foo()
assertEquals(1, result)
return "OK"
}