Box inline class returned from suspend lambda non-locally in JVM_IR
#KT-41194 Fixed
This commit is contained in:
+4
@@ -827,6 +827,10 @@ class ExpressionCodegen(
|
||||
}
|
||||
val afterReturnLabel = Label()
|
||||
expression.value.accept(this, data).materializeAt(returnType, returnIrType)
|
||||
// In case of non-local return from suspend lambda 'materializeAt' does not box return value, box it manually.
|
||||
if (isNonLocalReturn && owner.isInvokeSuspendOfLambda() && expression.value.type.isKotlinResult()) {
|
||||
StackValue.boxInlineClass(expression.value.type.toIrBasedKotlinType(), mv)
|
||||
}
|
||||
generateFinallyBlocksIfNeeded(returnType, afterReturnLabel, data)
|
||||
expression.markLineNumber(startOffset = true)
|
||||
if (isNonLocalReturn) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
// IGNORE_BACKEND: JVM_IR, JS_IR
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
import kotlin.coroutines.*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user