KT-8575 Add tests and disable reflection for Java synthetic property references

This commit is contained in:
Pavel Mikhailovskii
2022-09-22 10:48:14 +02:00
committed by teamcity
parent 5116bbc440
commit f8fd23e373
12 changed files with 210 additions and 46 deletions
@@ -0,0 +1,35 @@
// TARGET_BACKEND: JVM
// WITH_STDLIB
// FILE: J.java
public class J implements K {
private String foo;
@Override
public String getFoo() {
return foo;
}
@Override
public void setFoo(String s) {
foo = s;
}
}
// FILE: K.kt
import kotlin.test.assertEquals
interface K {
var foo: String
}
fun box(): String {
val p = J::foo
assertEquals("foo", p.name)
val j = J()
p.set(j, "OK")
return p.get(j)
}