mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 15:53:40 +00:00
17 lines
205 B
Kotlin
Vendored
17 lines
205 B
Kotlin
Vendored
interface T {
|
|
fun foo(a: () -> Any): T = this
|
|
}
|
|
|
|
fun foo(t: T) {
|
|
t.foo { <caret>1 }
|
|
.foo {2}
|
|
.foo({ 3 })
|
|
}
|
|
|
|
/*
|
|
1
|
|
{ 1 }
|
|
t.foo{...}
|
|
t.foo{...}.foo{...}
|
|
t.foo{...}.foo{...}.foo(...)
|
|
*/ |