Push Down: Support moving members from Java to Kotlin class

#KT-9485 Fixed
This commit is contained in:
Alexey Sedunov
2016-09-22 20:19:36 +03:00
parent 924bb44862
commit 956c6eeec7
67 changed files with 604 additions and 161 deletions
@@ -0,0 +1,32 @@
abstract class <caret>A {
// INFO: {"checked": "true"}
open val x: Int = 1
// INFO: {"checked": "true"}
abstract val y: Boolean
// INFO: {"checked": "true", "toAbstract": "true"}
open val z: Int = 1
// INFO: {"checked": "true"}
open fun foo(n: Int) = n + 1
// INFO: {"checked": "true"}
abstract fun foo(n: Int, m: Int)
// INFO: {"checked": "true", "toAbstract": "true"}
open fun foo(b: Boolean) = !b
// INFO: {"checked": "true"}
class X
}
class B : A {
override val x: Int = 2
override val y: Boolean get() = x > 0
override val z: Int = 3
override fun foo(n: Int) = n + 2
override fun foo(n: Int, m: Int) = n + m
override fun foo(b: Boolean) = true
class X
}