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

21 lines
331 B
Kotlin
Vendored

import kotlin.test.*
// The test below is inspired by https://youtrack.jetbrains.com/issue/KT-48876.
fun bar2(): Any {
return foo2()
}
inline fun foo2(): Int {
return try {
throw Throwable()
} catch (e: Throwable) {
return 2
}
}
fun box(): String {
assertEquals(2, bar2())
return "OK"
}