Generate private suspend function in JVM as package-private
It helps to simplify implementation of generating state machines into the named functions' bodies but of course has some flaws: 1. They may be called from the same package in Java 2. It may lead to problems when declaring clashing descriptor in an inheritor This change must be reverted at some moment, or these flaws should be fixed in some other way #KT-17585 In Progress #KT-17584 Open
This commit is contained in:
@@ -395,6 +395,10 @@ public class AsmUtil {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (memberDescriptor instanceof FunctionDescriptor && ((FunctionDescriptor) memberDescriptor).isSuspend()) {
|
||||
return NO_FLAG_PACKAGE_PRIVATE;
|
||||
}
|
||||
|
||||
// the following code is only for PRIVATE visibility of member
|
||||
if (memberDescriptor instanceof ConstructorDescriptor) {
|
||||
if (isEnumEntry(containingDeclaration)) {
|
||||
|
||||
Reference in New Issue
Block a user