Rename: Fix processing of references to synthetic Java properties
#KT-17742 Fixed
This commit is contained in:
+4
@@ -0,0 +1,4 @@
|
||||
public class SyntheticProperty {
|
||||
public int getSyntheticA() { return 1; }
|
||||
public void foo(int x) { }
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
fun synthesize(p: SyntheticProperty) {
|
||||
val v1 = p.syntheticA
|
||||
p.foo(1)
|
||||
p.foo(p.syntheticA + 2)
|
||||
p.foo(p.syntheticA.inc())
|
||||
val syntheticA = p.syntheticA
|
||||
p.foo(syntheticA.inc())
|
||||
val x = syntheticA
|
||||
val i = p.syntheticA.inc()
|
||||
p.foo(i)
|
||||
val y = i
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
public class SyntheticProperty {
|
||||
public int getSyntheticA() { return 1; }
|
||||
public void /*rename*/setSyntheticA(int x) { }
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fun synthesize(p: SyntheticProperty) {
|
||||
val v1 = p.syntheticA
|
||||
p.syntheticA = 1
|
||||
p.syntheticA += 2
|
||||
p.syntheticA++
|
||||
val x = p.syntheticA++
|
||||
val y = ++p.syntheticA
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"type": "AUTO_DETECT",
|
||||
"mainFile": "SyntheticProperty.java",
|
||||
"newName": "foo",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
Reference in New Issue
Block a user