Files
kotlin-fork/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.kt
T
Dmitry Petrov 779cae7db5 Adjust receivers for possibly synthetic properties access
Synthetic property accessors are treated as extension functions on Java
classes by the front-end. However, underlying Java accessor methods are
proper members.
2018-07-20 16:46:18 +03:00

15 lines
245 B
Kotlin
Vendored

// FILE: javaSyntheticPropertyAccess.kt
fun test(j: J) {
j.foo
j.foo = 1
j.foo++
j.foo += 1
}
// FILE: J.java
public class J {
private int foo = 42;
public int getFoo() { return foo; }
public void setFoo(int x) {}
}