73032213f0
^KT-61259
18 lines
263 B
Kotlin
Vendored
18 lines
263 B
Kotlin
Vendored
import kotlin.test.*
|
|
|
|
inline fun runAndThrow(action: () -> Unit): Nothing {
|
|
action()
|
|
throw Exception()
|
|
}
|
|
|
|
inline fun foo(): Int = runAndThrow {
|
|
return 1
|
|
}
|
|
|
|
fun box(): String {
|
|
val result: Any = foo()
|
|
assertEquals(1, result)
|
|
|
|
return "OK"
|
|
}
|