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 boolean prop;
public boolean isProp2() { return prop; }
public void setProp2(boolean prop) { this.prop = prop; }
void test() {
isProp2();
setProp2(true);
}
}
@@ -0,0 +1,4 @@
fun test(bean: Bean) {
bean.isProp2 = true
println(bean.isProp2)
}
@@ -0,0 +1,10 @@
public class Bean {
private boolean prop;
public boolean isProp() { return prop; }
public void setProp(boolean prop) { this.prop = prop; }
void test() {
isProp();
setProp(true);
}
}
@@ -0,0 +1,4 @@
fun test(bean: Bean) {
bean.isProp = true
println(bean./*rename*/isProp)
}
@@ -0,0 +1,5 @@
{
"type": "SYNTHETIC_PROPERTY",
"mainFile": "test.kt",
"newName": "isProp2"
}