Rename: Fixed rename of Java getters/setters through synthetic property references in Kotlin

#KT-8817 Fixed
This commit is contained in:
Alexey Sedunov
2016-04-19 19:01:04 +03:00
parent a45165838a
commit cc5c3c2353
27 changed files with 311 additions and 6 deletions
@@ -0,0 +1,10 @@
public class Bean {
private String prop = "value";
public String getProp2() { return prop; }
public void setProp2(String prop) { this.prop = prop; }
void test() {
getProp2();
setProp2("");
}
}
@@ -0,0 +1,5 @@
fun test(bean: Bean) {
bean.prop2 = "a"
println(bean.prop2)
bean.prop2 += "a"
}
@@ -0,0 +1,10 @@
public class Bean {
private String prop = "value";
public String getProp() { return prop; }
public void setProp(String prop) { this.prop = prop; }
void test() {
getProp();
setProp("");
}
}
@@ -0,0 +1,5 @@
fun test(bean: Bean) {
bean.prop = "a"
println(bean./*rename*/prop)
bean.prop += "a"
}
@@ -0,0 +1,5 @@
{
"type": "SYNTHETIC_PROPERTY",
"mainFile": "test.kt",
"newName": "prop2"
}