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:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user