JVM_IR: repair synthetic accessors to fields

This commit is contained in:
Georgy Bronnikov
2020-04-13 14:06:29 +03:00
parent 461c368ee0
commit 41a28bde5c
8 changed files with 99 additions and 22 deletions
@@ -0,0 +1,23 @@
// TARGET_BACKEND: JVM
// IGNORE_BACKEND_FIR: JVM_IR
// FILE: ProtectedField.java
public abstract class ProtectedField {
protected String field = "fail";
}
//FILE: test.kt
package test
import ProtectedField
class Derived: ProtectedField() {
fun setAndGetField(arg: String) = myRun {
super.field = arg
super.field
}
}
fun myRun(f: () -> String) = f()
fun box() = Derived().setAndGetField("OK")