mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 15:53:46 +00:00
20 lines
230 B
Kotlin
Vendored
20 lines
230 B
Kotlin
Vendored
// FILE: 1.kt
|
|
|
|
package test
|
|
|
|
class Foo(val z: String)
|
|
|
|
val Foo.a: String
|
|
get() = z
|
|
|
|
inline fun test(s: () -> String): String {
|
|
return s()
|
|
}
|
|
|
|
// FILE: 2.kt
|
|
|
|
import test.*
|
|
|
|
fun box(): String {
|
|
return test(Foo("OK")::a)
|
|
} |