mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 08:31:29 +00:00
18 lines
225 B
Kotlin
Vendored
18 lines
225 B
Kotlin
Vendored
// FILE: 1.kt
|
|
|
|
package test
|
|
|
|
inline fun go(f: () -> String) = f()
|
|
|
|
fun String.id(): String = this
|
|
|
|
fun foo(x: String, y: String): String {
|
|
return go((x + y)::id)
|
|
}
|
|
|
|
// FILE: 2.kt
|
|
|
|
import test.*
|
|
|
|
fun box() = foo("O", "K")
|