KT-7135 Java to Kotlin converter should update usages in Java and Koltin code in the rest of the project
#KT-7135 Fixed
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
public class AAA {
|
||||
public void foo() {
|
||||
setX(getX() + 1);
|
||||
}
|
||||
|
||||
private static int ourX = 42;
|
||||
|
||||
public static int getX() {
|
||||
return ourX;
|
||||
}
|
||||
|
||||
public static void setX(int x) {
|
||||
ourX = x;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
public class AAA {
|
||||
public fun foo() {
|
||||
x = x + 1
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
public var x: Int = 42
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
public class AAA {
|
||||
private static int ourX = 42;
|
||||
private static int y = 0;
|
||||
private static int z = 0;
|
||||
|
||||
public static int getX() {
|
||||
return ourX;
|
||||
}
|
||||
|
||||
public static void setX(int x) {
|
||||
ourX = x;
|
||||
}
|
||||
|
||||
public static int getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
public static void setY(int y) {
|
||||
AAA.y = y;
|
||||
}
|
||||
|
||||
public static int getZ() {
|
||||
return z;
|
||||
}
|
||||
|
||||
public static void setZ(int z) {
|
||||
Other.z = z;
|
||||
}
|
||||
}
|
||||
|
||||
class Other {
|
||||
public static int z = 0;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
public object AAA {
|
||||
public var x: Int = 42
|
||||
public var y: Int = 0
|
||||
public val z: Int = 0
|
||||
|
||||
public fun setZ(z: Int) {
|
||||
Other.z = z
|
||||
}
|
||||
}
|
||||
|
||||
object Other {
|
||||
public var z: Int = 0
|
||||
}
|
||||
Reference in New Issue
Block a user