JVM IR: don't rename fake overrides for fields
In case derived class has a field with the same name as the base class, RenameFieldsLowering previously tried to rename one of the fields by adding the "...$1" suffix, which led to NoSuchFieldError.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// FILE: test.kt
|
||||
|
||||
abstract class A {
|
||||
@JvmField
|
||||
protected var flag: String = "Fail"
|
||||
}
|
||||
|
||||
fun box(): String = object : J() {
|
||||
val result = flag
|
||||
}.result
|
||||
|
||||
// FILE: J.java
|
||||
|
||||
public class J extends A {
|
||||
protected String flag = "OK";
|
||||
}
|
||||
Reference in New Issue
Block a user