Files
kotlin-fork/native/native.tests/testData/codegen/inline/redundantCoercionsCleaner.kt
T
2023-12-19 10:57:24 +00:00

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"
}