From 47c4197098c2f687eec30c1e4e2f3851b78e44fa Mon Sep 17 00:00:00 2001 From: Zalim Bashorov Date: Wed, 13 Jan 2021 00:37:30 +0300 Subject: [PATCH] [JS old] Revert fix made for KT-44221 in ab753625 And mute the test for old BE. #KT-44221 Open --- .../testData/codegen/box/coroutines/kt44221.kt | 3 ++- .../translate/callTranslator/CallTranslator.kt | 17 +++-------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/compiler/testData/codegen/box/coroutines/kt44221.kt b/compiler/testData/codegen/box/coroutines/kt44221.kt index 631344981e5..9f4324536ce 100644 --- a/compiler/testData/codegen/box/coroutines/kt44221.kt +++ b/compiler/testData/codegen/box/coroutines/kt44221.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JS // WITH_RUNTIME import kotlin.coroutines.* @@ -21,4 +22,4 @@ private class CharTest { } -fun box(): String = CharTest().simpleTest() \ No newline at end of file +fun box(): String = CharTest().simpleTest() diff --git a/js/js.translator/src/org/jetbrains/kotlin/js/translate/callTranslator/CallTranslator.kt b/js/js.translator/src/org/jetbrains/kotlin/js/translate/callTranslator/CallTranslator.kt index 1177ee34099..2e227444b7c 100644 --- a/js/js.translator/src/org/jetbrains/kotlin/js/translate/callTranslator/CallTranslator.kt +++ b/js/js.translator/src/org/jetbrains/kotlin/js/translate/callTranslator/CallTranslator.kt @@ -1,17 +1,6 @@ /* - * Copyright 2010-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.js.translate.callTranslator @@ -157,7 +146,7 @@ private fun translateFunctionCall( source = resolvedCall.call.callElement })) context.currentBlock.statements += statement - callExpression = context.createCoroutineResult(resolvedCall) + return context.createCoroutineResult(resolvedCall) } else { callExpression = callInfo.constructSafeCallIfNeeded(callExpression)