Files
kotlin-fork/compiler/testData/codegen/box/invokedynamic/sam/capturedExtensionReceiver.kt
T

24 lines
363 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// SAM_CONVERSIONS: INDY
// CHECK_BYTECODE_TEXT
// JVM_IR_TEMPLATES
// 1 java/lang/invoke/LambdaMetafactory
fun interface KRunnable {
fun run()
}
fun runIt(kr: KRunnable) {
kr.run()
}
class C(var value: String)
fun C.test(): String {
runIt { value = "OK" }
return value
}
fun box() = C("xxx").test()