Rename: Fixed rename of Kotlin enum constants/@JvmField properties through Java references
#KT-11817 Fixed
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
public class EnumJavaRef {
|
||||
public void use(EnumTarget p) {
|
||||
System.out.println(p == EnumTarget.YELLOW);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
enum class EnumTarget { YELLOW, GREEN, BLUE }
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public class EnumJavaRef {
|
||||
public void use(EnumTarget p) {
|
||||
System.out.println(p == EnumTarget./*rename*/RED);
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
enum class EnumTarget { RED, GREEN, BLUE }
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"type": "MARKED_ELEMENT",
|
||||
"mainFile": "EnumJavaRef.java",
|
||||
"newName": "YELLOW",
|
||||
"byRef": "true"
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package testing.rename
|
||||
|
||||
public open class C {
|
||||
@JvmStatic var <caret> second = 1
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
package testing;
|
||||
|
||||
import testing.rename.C;
|
||||
|
||||
class JavaClient {
|
||||
public void foo(C c) {
|
||||
int n = c.second;
|
||||
c.second = 2;
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package testing.rename
|
||||
|
||||
public open class C {
|
||||
@JvmStatic var <caret>first = 1
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
package testing;
|
||||
|
||||
import testing.rename.C;
|
||||
|
||||
class JavaClient {
|
||||
public void foo(C c) {
|
||||
int n = c.first;
|
||||
c.first = 2;
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"type": "KOTLIN_PROPERTY",
|
||||
"classId": "testing/rename/C",
|
||||
"oldName": "first",
|
||||
"newName": "second",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
Reference in New Issue
Block a user