diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/AbstractSuspendFunctionsLowering.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/AbstractSuspendFunctionsLowering.kt index 051025f0c1b..1fae70c5f66 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/AbstractSuspendFunctionsLowering.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/AbstractSuspendFunctionsLowering.kt @@ -221,7 +221,7 @@ abstract class AbstractSuspendFunctionsLowering(val co endOffset = irFunction.endOffset origin = DECLARATION_ORIGIN_COROUTINE_IMPL name = nameForCoroutineClass(irFunction) - visibility = irFunction.visibility + visibility = DescriptorVisibilities.PRIVATE }.apply { parent = irFunction.parent createParameterDeclarations() diff --git a/kotlin-native/backend.native/tests/filecheck/suspend_returnNothing.kt b/kotlin-native/backend.native/tests/filecheck/suspend_returnNothing.kt index e9558eec71b..fc98f4c65ed 100644 --- a/kotlin-native/backend.native/tests/filecheck/suspend_returnNothing.kt +++ b/kotlin-native/backend.native/tests/filecheck/suspend_returnNothing.kt @@ -16,7 +16,7 @@ open class EmptyContinuation(override val context: CoroutineContext = EmptyCorou suspend fun suspendForever(): Int = suspendCoroutineUninterceptedOrReturn { COROUTINE_SUSPENDED } -// CHECK-LABEL: define %struct.ObjHeader* @"kfun:$fooCOROUTINE +// CHECK-LABEL: define internal %struct.ObjHeader* @"kfun:$fooCOROUTINE // CHECK-NOT: ; Function Attrs: {{.*}}noreturn // CHECK-LABEL: define %struct.ObjHeader* @"kfun:#foo#suspend(kotlin.coroutines.Continuation){}kotlin.Any" diff --git a/kotlin-native/backend.native/tests/filecheck/suspend_tailcalls.kt b/kotlin-native/backend.native/tests/filecheck/suspend_tailcalls.kt index 9bc15c7e652..0b29c52d41d 100644 --- a/kotlin-native/backend.native/tests/filecheck/suspend_tailcalls.kt +++ b/kotlin-native/backend.native/tests/filecheck/suspend_tailcalls.kt @@ -281,7 +281,7 @@ suspend fun s23(f: Boolean) { // CHECK-LABEL: define %struct.ObjHeader* @"kfun:#s24#suspend(kotlin.coroutines.Continuation){}kotlin.Any suspend fun s24() { - // CHECK: call void @"kfun:$s24COROUTINE${{[0-9]*}}# + // CHECK: call void @"kfun:$s24COROUTINE${{[0-9]*}}.#internal sInt() } // CHECK-LABEL: epilogue: