Don't put outer instance twice for anonymous object extending inner

#KT-5343 In Progress
This commit is contained in:
Alexander Udalov
2014-10-14 19:42:25 +04:00
parent 7315146753
commit 61674fb3d9
4 changed files with 43 additions and 1 deletions
@@ -0,0 +1,14 @@
class A {
fun box(): String {
class Local : Inner() {
val u = foo()
}
val u = Local().u
return if (u == 42) "OK" else "Fail $u"
}
open inner class Inner
fun foo() = 42
}
fun box() = A().box()