Files
kotlin-fork/compiler/testData/codegen/box/closures/kt47894_inlineFunWithObjectWithNothing.kt
T
Alexander Udalov 328853dffe Add tests for obsolete issues
(Test for KT-37331 is added to multiplatform/defaultArguments/suspend.kt.)

 #KT-30080
 #KT-33641
 #KT-36237
 #KT-36952
 #KT-37331
 #KT-38920
 #KT-39256
 #KT-42415
 #KT-44636
 #KT-45704
 #KT-47084
 #KT-47894
2022-03-08 14:19:37 +01:00

24 lines
438 B
Kotlin
Vendored

interface Kla6 {
fun fu32()
}
class Kla7 {
inline fun fu33(crossinline f: (Int) -> Any) =
object : Kla6 {
override fun fu32() {
f(1)
}
var ttmh: Int = throw RuntimeException()
}.fu32()
inline fun fu34(crossinline f: (Int) -> Any) =
fu33 { f(1) }
}
fun box(): String = try {
Kla7().fu34 {}
"Fail"
} catch (e: RuntimeException) {
"OK"
}