From 3783205fb77010f3b52fe86f12456bb0279c1030 Mon Sep 17 00:00:00 2001 From: Roman Artemev Date: Fri, 21 Feb 2020 18:37:27 +0300 Subject: [PATCH] [JS IR] Lower suspend lambda as a regular lambda --- .../js/lower/CallableReferenceLowering.kt | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/CallableReferenceLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/CallableReferenceLowering.kt index 66e22632f3c..6cb14d92b32 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/CallableReferenceLowering.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/CallableReferenceLowering.kt @@ -43,28 +43,6 @@ class CallableReferenceLowering(private val context: CommonBackendContext) : Bod override fun visitFunctionExpression(expression: IrFunctionExpression): IrExpression { expression.transformChildrenVoid(this) - if (expression.function.isSuspend) { - val startOffset = expression.startOffset - val endOffset = expression.endOffset - val type = expression.type - val origin = expression.origin - val function = expression.function - - return IrBlockImpl( - startOffset, endOffset, type, origin, - listOf( - function, - IrFunctionReferenceImpl( - startOffset, endOffset, type, - function.symbol, - typeArgumentsCount = 0, - reflectionTarget = null, - origin = origin - ) - ) - ) - } - val function = expression.function val (clazz, ctor) = buildLambdaReference(function, expression)