Files
kotlin-fork/compiler/testData/codegen/boxInline/anonymousObject/kt17972_4.kt
T
Alexander Udalov 3f034e8b67 Enable lightweight lambdas (aka invokedynamic) since 2.0
#KT-45375 Fixed
 #KT-58173 Open
2024-02-08 19:46:18 +00:00

39 lines
671 B
Kotlin
Vendored

// IGNORE_INLINER_K2: IR
// NO_CHECK_LAMBDA_INLINING
// FILE: 1.kt
package test
class Test {
val prop: String = "OK"
fun test() =
inlineFun {
noInline {
inlineFun {
noInline {
object {
val inflater = prop
}.inflater
}
}
}
}
}
inline fun <T> inlineFun(init: () -> T): T {
return init()
}
fun <T> noInline(init: () -> T): T {
return init()
}
// FILE: 2.kt
import test.*
fun box(): String {
return Test().test()
}