Unconditionally remove $$forInline suffix from enclosing method
when transforming objects with suspend functions/lambdas, which capture crossinline suspend lambdas. Since functions with the suffix have a counterpart without the suffix, for java interop and reflection call purposes, it is safe change. #KT-31242 Fixed
This commit is contained in:
+1
-5
@@ -253,11 +253,7 @@ class AnonymousObjectTransformer(
|
||||
// Since $$forInline functions are not generated if retransformation is the last one (i.e. call site is not inline)
|
||||
// link to the function in OUTERCLASS field becomes invalid. However, since $$forInline function always has no-inline
|
||||
// companion without the suffix, use it.
|
||||
if (info.isSuspend && info.isInlineOrInsideInline) {
|
||||
visitor.visitOuterClass(info.ownerClassName, info.functionName?.removeSuffix(FOR_INLINE_SUFFIX), info.functionDesc)
|
||||
} else {
|
||||
visitor.visitOuterClass(info.ownerClassName, info.functionName, info.functionDesc)
|
||||
}
|
||||
visitor.visitOuterClass(info.ownerClassName, info.functionName?.removeSuffix(FOR_INLINE_SUFFIX), info.functionDesc)
|
||||
}
|
||||
|
||||
private fun inlineMethodAndUpdateGlobalResult(
|
||||
|
||||
Reference in New Issue
Block a user