Support bound callable references in codegen
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
inline fun foo(x: () -> String) = x()
|
||||
|
||||
fun String.id() = this
|
||||
|
||||
fun box() = foo("OK"::id)
|
||||
@@ -0,0 +1,4 @@
|
||||
fun box(): String {
|
||||
val f = "KOTLIN"::get
|
||||
return "${f(1)}${f(0)}"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
fun box(): String {
|
||||
val f = "kotlin"::length
|
||||
val result = f.get()
|
||||
return if (result == 6) "OK" else "Fail: $result"
|
||||
}
|
||||
Reference in New Issue
Block a user