From ef55ebacdc9802bd161a196576e54440c547f854 Mon Sep 17 00:00:00 2001 From: Igor Chevdar Date: Mon, 28 Jan 2019 18:15:39 +0300 Subject: [PATCH] Supported inlining of suspend lambdas --- .../jetbrains/kotlin/backend/konan/lower/FunctionInlining.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/FunctionInlining.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/FunctionInlining.kt index 8c702091bac..b133a3a173d 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/FunctionInlining.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/FunctionInlining.kt @@ -262,8 +262,7 @@ internal class FunctionInlining(val context: Context) : IrElementTransformerVoid val isInlinableLambdaArgument: Boolean get() { if (!parameter.isInlineParameter()) return false - if (argumentExpression is IrFunctionReference - && !argumentExpression.descriptor.isSuspend) return true // Skip suspend functions for now since it's not supported by FE anyway. + if (argumentExpression is IrFunctionReference) return true // Do pattern-matching on IR. if (argumentExpression !is IrBlock) return false