mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-13 15:53:49 +00:00
14 lines
192 B
Kotlin
Vendored
14 lines
192 B
Kotlin
Vendored
class X(val v: Int) {
|
|
fun <caret>foo() {
|
|
println("foo()")
|
|
return v
|
|
}
|
|
}
|
|
|
|
fun X.f1() {
|
|
println("Value: ${foo()}")
|
|
}
|
|
|
|
fun f2(x: X) {
|
|
println("Value: ${x.foo()}")
|
|
} |