Rename: Suggest renaming both property accessors with matching @JvmName when renaming one of them from Java

#KT-12759 Fixed
(cherry picked from commit 81a8e6a)
This commit is contained in:
Alexey Sedunov
2016-06-21 15:18:16 +03:00
parent 248f4c1645
commit efa27e6048
13 changed files with 123 additions and 0 deletions
@@ -0,0 +1,8 @@
package test;
class Test {
{
new A().getFooNew();
new A().setFooNew(1);
}
}
@@ -0,0 +1,12 @@
package test
class A {
@get:JvmName("getFooNew")
@set:JvmName("setFooNew")
var first = 1
}
fun test() {
A().first
A().first = 1
}
@@ -0,0 +1,8 @@
package test;
class Test {
{
new A()./*rename*/getFoo();
new A().setFoo(1);
}
}
@@ -0,0 +1,12 @@
package test
class A {
@get:JvmName("getFoo")
@set:JvmName("setFoo")
var first = 1
}
fun test() {
A().first
A().first = 1
}
@@ -0,0 +1,7 @@
{
"type": "MARKED_ELEMENT",
"mainFile": "test/JavaClient.java",
"newName": "getFooNew",
"withRuntime": "true",
"byRef": "true"
}
@@ -0,0 +1,8 @@
package test;
class Test {
{
new A().getFooNew();
new A().setFooNew(1);
}
}
@@ -0,0 +1,12 @@
package test
class A {
@get:JvmName("getFooNew")
@set:JvmName("setFooNew")
var first = 1
}
fun test() {
A().first
A().first = 1
}
@@ -0,0 +1,8 @@
package test;
class Test {
{
new A().getFoo();
new A()./*rename*/setFoo(1);
}
}
@@ -0,0 +1,12 @@
package test
class A {
@get:JvmName("getFoo")
@set:JvmName("setFoo")
var first = 1
}
fun test() {
A().first
A().first = 1
}
@@ -0,0 +1,7 @@
{
"type": "MARKED_ELEMENT",
"mainFile": "test/JavaClient.java",
"newName": "setFooNew",
"withRuntime": "true",
"byRef": "true"
}