Method Hierarchy: Refactoring

- Do not rely on light methods and Java method hierarchy
- Support val/var parameters
- Support built-in member functions

 #KT-14346 Fixed
This commit is contained in:
Alexey Sedunov
2017-07-03 20:44:41 +03:00
parent 10941ae732
commit 53d12e6cf7
16 changed files with 316 additions and 39 deletions
@@ -0,0 +1,20 @@
<node text="List (kotlin.collections)" base="true">
<node text="UnmodifiableList in Collections (java.util)"/>
<node text="CheckedList in Collections (java.util)"/>
<node text="SynchronizedList in Collections (java.util)"/>
<node text="AbstractList (java.util)">
<node text="ArrayList in Arrays (java.util)"/>
<node text="EmptyList in Collections (java.util)"/>
<node text="SubList in ArrayList (java.util)"/>
<node text="AbstractSequentialList (java.util)"/>
<node text="CopiesList in Collections (java.util)"/>
<node text="SingletonList in Collections (java.util)"/>
<node text="ArrayList (java.util)"/>
</node>
<node text="ArrayList (java.util)"/>
<node text="AbstractList (kotlin.collections)">
<node text="SubList in AbstractList (kotlin.collections)"/>
<node text="ReversedListReadOnly (kotlin.collections)"/>
</node>
<node text="EmptyList (kotlin.collections)"/>
</node>
@@ -0,0 +1,3 @@
fun foo(list: List<String>){
list.<caret>get(1)
}
@@ -0,0 +1,12 @@
<node text="T ()" base="true">
<node text="B ()"/>
<node text="X ()"/>
<node text="Y ()">
<node text="A ()">
<node text="C ()"/>
</node>
<node text="Z ()">
<node text="D ()"/>
</node>
</node>
</node>
@@ -0,0 +1,3 @@
fun <caret>foo() {
}
@@ -0,0 +1 @@
Cannot apply action for element at caret
@@ -0,0 +1,5 @@
<node text="T ()" base="true">
<node text="B ()"/>
<node text="X ()"/>
<node text="Y ()"/>
</node>
@@ -0,0 +1,9 @@
open class T(open var <caret>foo: String = "")
open class X: T("") {
override var foo: String
get() = ""
set(value: String) {}
}
open class Y(override var foo: String = ""): T(foo)
@@ -0,0 +1,15 @@
class B extends T {
B() {
super("");
}
@Override
public String getFoo() {
return "";
}
@Override
public void setFoo(String value) {
}
}