779cae7db5
Synthetic property accessors are treated as extension functions on Java classes by the front-end. However, underlying Java accessor methods are proper members.
15 lines
245 B
Kotlin
Vendored
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) {}
|
|
} |