IR: compute correct IR-based mangles for Java fields
This commit is contained in:
committed by
TeamCityServer
parent
044acbb5ef
commit
eda913554d
+7
@@ -256,8 +256,15 @@ abstract class IrMangleComputer(protected val builder: StringBuilder, private va
|
||||
typeParameters.collectForMangler(builder, MangleConstant.TYPE_PARAMETERS) { mangleTypeParameter(this, it) }
|
||||
|
||||
builder.append(declaration.name.asString())
|
||||
|
||||
if (declaration.isSyntheticForJavaField) {
|
||||
builder.append(MangleConstant.JAVA_FIELD_SUFFIX)
|
||||
}
|
||||
}
|
||||
|
||||
private val IrProperty.isSyntheticForJavaField: Boolean
|
||||
get() = origin == IrDeclarationOrigin.IR_EXTERNAL_JAVA_DECLARATION_STUB && getter == null && setter == null
|
||||
|
||||
override fun visitField(declaration: IrField) {
|
||||
val prop = declaration.correspondingPropertySymbol
|
||||
if (compatibleMode || prop == null) { // act as used to be (KT-48912)
|
||||
|
||||
Reference in New Issue
Block a user