mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-18 00:21:35 +00:00
29 lines
416 B
Kotlin
Vendored
29 lines
416 B
Kotlin
Vendored
// IGNORE_BACKEND: JVM_IR
|
|
// FILE: 1.kt
|
|
package test
|
|
|
|
public inline fun myRun(block: () -> Unit) {
|
|
return block()
|
|
}
|
|
|
|
// FILE: 2.kt
|
|
|
|
//NO_CHECK_LAMBDA_INLINING
|
|
import test.*
|
|
|
|
fun box(): String {
|
|
var res = ""
|
|
myRun {
|
|
val x = object {
|
|
fun foo() {
|
|
res = "OK"
|
|
}
|
|
}
|
|
object {
|
|
fun bar() = x.foo()
|
|
}.bar()
|
|
}
|
|
|
|
return res
|
|
}
|