JVM KT-41150: Fix backward compatibility for inline vals in inline class
In 1.3.x, for inline class member inline vals 'getFoo-impl' method was generated in corresponding inline class. Since 1.4.0, getters for properties returning inline class values are mangled (so corresponding getters are named 'getFoo-<mangling_hash>'. However, to maintain backward compatibility with libraries compiled with 1.3.x, inliner should be able to find 'getFoo-impl' method in the bytecode.
This commit is contained in:
@@ -658,6 +658,10 @@ abstract class InlineCodegen<out T : BaseExpressionCodegen>(
|
||||
if (nameWithoutManglingSuffix != null) {
|
||||
methodNode = getMethodNode(bytes, nameWithoutManglingSuffix, asmMethod.descriptor, classType)
|
||||
}
|
||||
if (methodNode == null) {
|
||||
val nameWithImplSuffix = "$nameWithoutManglingSuffix-impl"
|
||||
methodNode = getMethodNode(bytes, nameWithImplSuffix, asmMethod.descriptor, classType)
|
||||
}
|
||||
}
|
||||
return methodNode
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user