33 lines
505 B
Kotlin
Vendored
33 lines
505 B
Kotlin
Vendored
// FILE: 1.kt
|
|
package test
|
|
|
|
class Test {
|
|
|
|
val prop: String = "OK"
|
|
|
|
fun test() =
|
|
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
|
|
//NO_CHECK_LAMBDA_INLINING
|
|
|
|
import test.*
|
|
|
|
fun box(): String {
|
|
return Test().test()
|
|
} |