JVM_IR indy-SAM conversions, 1st passing tests
KT-44278 KT-26060 KT-42621
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// SAM_CONVERSIONS: INDY
|
||||
|
||||
fun interface KRunnable {
|
||||
fun run()
|
||||
}
|
||||
|
||||
fun runIt(kr: KRunnable) {
|
||||
kr.run()
|
||||
}
|
||||
|
||||
class C(var value: String) {
|
||||
fun fn() {
|
||||
value = "OK"
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val c = C("xxx")
|
||||
runIt(c::fn)
|
||||
return c.value
|
||||
}
|
||||
Reference in New Issue
Block a user