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:
+3
-1
@@ -96,7 +96,9 @@ private class FieldNameCollector : IrElementVisitorVoid {
|
||||
}
|
||||
|
||||
override fun visitField(declaration: IrField) {
|
||||
nameToField.getOrPut(declaration.parent to declaration.name) { mutableListOf() }.add(declaration)
|
||||
if (!declaration.isFakeOverride) {
|
||||
nameToField.getOrPut(declaration.parent to declaration.name) { mutableListOf() }.add(declaration)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user