[Tests] Migrate backend-independent tests from native to compiler/testData.
^KT-65979
This commit is contained in:
committed by
Space Team
parent
dd9332d9e1
commit
febac0dd5f
@@ -0,0 +1,21 @@
|
||||
// WITH_STDLIB
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user