#KT-3023 Fixed

This commit is contained in:
Alexey Sedunov
2012-11-07 18:33:21 +04:00
parent 415b6f8efe
commit 8cff709bfb
4 changed files with 47 additions and 1 deletions
@@ -0,0 +1,15 @@
class Bar(val name: String)
abstract class Foo {
public abstract fun foo(): String
}
fun box(): String {
return object: Foo() {
data class NestedFoo(val bar: Bar)
override fun foo(): String {
return NestedFoo(Bar("Fail")).copy(bar = Bar("OK")).bar.name
}
}.foo()
}