mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 15:53:46 +00:00
21 lines
281 B
Kotlin
Vendored
21 lines
281 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
// FILE: 1.kt
|
|
|
|
package test
|
|
|
|
inline fun stub(f: () -> String): String = f()
|
|
|
|
// FILE: 2.kt
|
|
|
|
import test.*
|
|
|
|
class A(val z: String) {
|
|
fun map(s: String) = z + s
|
|
}
|
|
|
|
|
|
fun box(): String {
|
|
val a = A("O")
|
|
val s = arrayOf("K")
|
|
return s.map(a::map).first()
|
|
} |