mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 15:53:46 +00:00
17 lines
242 B
Kotlin
Vendored
17 lines
242 B
Kotlin
Vendored
// FILE: 1.kt
|
|
|
|
package test
|
|
|
|
class Foo(val a: String)
|
|
|
|
inline fun <T> test(receiver: T, selector: (T) -> String): String {
|
|
return selector(receiver)
|
|
}
|
|
|
|
// FILE: 2.kt
|
|
|
|
import test.*
|
|
|
|
fun box(): String {
|
|
return test(Foo("OK"), Foo::a)
|
|
} |