KT-18786: J2K should move all properties to top of class

#KT-18786 fixed
This commit is contained in:
Dimach
2017-07-14 03:01:39 +03:00
committed by Simon Ogorodnik
parent ccfcfd8721
commit a59021a25e
30 changed files with 117 additions and 103 deletions
+14 -14
View File
@@ -15,20 +15,6 @@ internal class A {
private var field9: String? = "a"
private var field10: String? = foo()
fun foo(): String {
return "x"
}
fun bar() {
field5 = ArrayList()
field7++
field8++
field9 = null
field10 = null
}
internal interface I
private val anonymous: I = object : I {
}
@@ -43,6 +29,20 @@ internal class A {
private var iimpl = anonymous
fun foo(): String {
return "x"
}
fun bar() {
field5 = ArrayList()
field7++
field8++
field9 = null
field10 = null
}
internal interface I
fun testAnonymousObject(i: Any) {
if (true) {
iimpl = i as I