Native: add test for ^KT-48876
The issue itself was already fixed in 981a6ffe.
This commit is contained in:
committed by
Space
parent
eec4ac644c
commit
65bea27431
@@ -15,3 +15,21 @@ inline fun foo(): Int = runAndThrow {
|
||||
val result: Any = foo()
|
||||
assertEquals(1, result)
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun runTest2() {
|
||||
assertEquals(2, bar2())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user