Do not generate accessor if private function is accessed from

coroutines intrinsic lambda.
The logic is if the lambda is crossinline we need to generate the
accessor. However, suspendCoroutine's and
suspendCoroutineUninterceptedOrReturn's parameter, despite being
crossinline, are effectively inline. Thus, we do not need to generate
the accessor.
 #KT-27503 Fixed
This commit is contained in:
Ilmir Usmanov
2019-07-24 20:50:50 +03:00
parent b3e80e6a14
commit a35d405892
21 changed files with 119 additions and 73 deletions
@@ -0,0 +1,9 @@
// WITH_RUNTIME
// COMMON_COROUTINES_TEST
import COROUTINES_PACKAGE.*
private fun foo() {}
private suspend fun bar() = suspendCoroutine<Unit> {
foo()
}
@@ -0,0 +1,5 @@
@kotlin.Metadata
public final class PrivateAccessorKt {
synthetic final static @org.jetbrains.annotations.Nullable method bar(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.experimental.Continuation): java.lang.Object
private final static method foo(): void
}
@@ -0,0 +1,5 @@
@kotlin.Metadata
public final class PrivateAccessorKt {
synthetic final static @org.jetbrains.annotations.Nullable method bar(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.Continuation): java.lang.Object
private final static method foo(): void
}