mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
32 lines
443 B
Kotlin
Vendored
32 lines
443 B
Kotlin
Vendored
class Outer {
|
|
class Nested
|
|
inner class Inner
|
|
|
|
fun Inner.foo() {
|
|
Outer()
|
|
Nested()
|
|
Inner()
|
|
}
|
|
|
|
fun Nested.bar() {
|
|
Outer()
|
|
Nested()
|
|
Inner()
|
|
}
|
|
|
|
fun Outer.baz() {
|
|
Outer()
|
|
Nested()
|
|
Inner()
|
|
}
|
|
|
|
fun box(): String {
|
|
Inner().foo()
|
|
Nested().bar()
|
|
baz()
|
|
return "OK"
|
|
}
|
|
}
|
|
|
|
fun box() = Outer().box()
|