Files
kotlin/compiler/testData/codegen/dataClasses/copy/copyInNestedDataClass.kt
Alexey Sedunov 8cff709bfb #KT-3023 Fixed
2012-11-07 18:33:21 +04:00

15 lines
261 B
Kotlin

class Bar(val name: String)
class Baz {
class Foo() {
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()
}