mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
15 lines
273 B
Kotlin
15 lines
273 B
Kotlin
class Bar(val name: String)
|
|
|
|
class Baz {
|
|
inner class Foo() {
|
|
inner data class NestedFoo(val bar: Bar)
|
|
|
|
fun foo(): String {
|
|
return NestedFoo(Bar("FAIL")).copy(bar = Bar("OK")).bar.name
|
|
}
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
return Baz().Foo().foo()
|
|
} |