From 53878b69613bd790cee9f438520881dcf6774d39 Mon Sep 17 00:00:00 2001 From: Ilmir Usmanov Date: Fri, 14 Jun 2019 16:29:38 +0300 Subject: [PATCH] Do not generate synthetic accessors of local functions as suspend --- .../kotlin/backend/jvm/lower/SyntheticAccessorLowering.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/SyntheticAccessorLowering.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/SyntheticAccessorLowering.kt index 09628cdeae7..6045e6a256a 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/SyntheticAccessorLowering.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/SyntheticAccessorLowering.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2019 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. */ @@ -156,7 +156,7 @@ private class SyntheticAccessorLowering(val context: JvmBackendContext) : IrElem origin = JvmLoweredDeclarationOrigin.SYNTHETIC_ACCESSOR name = source.accessorName() visibility = Visibilities.PUBLIC - isSuspend = source.isSuspend + isSuspend = false // do not generate state-machine for synthetic accessors }.also { accessor -> accessor.parent = if ((source.parent as? IrClass)?.isInterface == true) { // Accessors for interfaces are only for private methods. They should always be placed in DefaultImpls. The only exception