mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
15 lines
158 B
Kotlin
Vendored
15 lines
158 B
Kotlin
Vendored
class A {
|
|
var result = "Fail"
|
|
}
|
|
|
|
fun A.foo() {
|
|
result = "OK"
|
|
}
|
|
|
|
fun box(): String {
|
|
val a = A()
|
|
val x = A::foo
|
|
x(a)
|
|
return a.result
|
|
}
|