mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 15:53:55 +00:00
30 lines
374 B
Kotlin
Vendored
30 lines
374 B
Kotlin
Vendored
// NO_CHECK_LAMBDA_INLINING
|
|
// WITH_RUNTIME
|
|
// FILE: 1.kt
|
|
package test
|
|
|
|
|
|
|
|
inline fun inlineFun(p: () -> Unit) {
|
|
p()
|
|
}
|
|
|
|
// FILE: 2.kt
|
|
|
|
import test.*
|
|
|
|
public fun box(): String {
|
|
var z = "fail"
|
|
inlineFun {
|
|
val obj = object {
|
|
val _delegate by lazy {
|
|
z = "OK"
|
|
}
|
|
}
|
|
|
|
obj._delegate
|
|
}
|
|
|
|
return z;
|
|
}
|