JVM_IR. Do not unbox Result in inline lambda
Since JVM_IR generates inline lambdas differently from old backend, in this case, it generates them as normal functions. Thus, there is no need to unbox the lambda argument. #KT-44671 Fixed
This commit is contained in:
+1
@@ -626,6 +626,7 @@ class ExpressionCodegen(
|
||||
// bridge to unbox it. Instead, we unbox it in the non-mangled function manually.
|
||||
private fun unboxResultIfNeeded(arg: IrGetValue) {
|
||||
if (arg.type.erasedUpperBound.fqNameWhenAvailable != StandardNames.RESULT_FQ_NAME) return
|
||||
if (irFunction.origin == IrDeclarationOrigin.LOCAL_FUNCTION_FOR_LAMBDA) return
|
||||
if (!onlyResultInlineClassParameters()) return
|
||||
if (irFunction !is IrSimpleFunction) return
|
||||
// Skip Result's methods
|
||||
|
||||
Reference in New Issue
Block a user