'SuspendFunction$n' should not be visible in member scopes (should be unresolved).
'SuspendFunction$n' class descriptors are created on demand by KotlinBuiltIns (and cached). On serialization, types constructed with 'SuspendFunction$n' are written as 'Function$n' with extra flag (SUSPEND_TYPE). On deserialization, corresponding 'SuspendFunction$n' classes are used.
This commit is contained in:
committed by
Stanislav Erokhin
parent
a70ac0160d
commit
80bd916f5d
+1
-2
@@ -127,9 +127,8 @@ class TypeClsStubBuilder(private val c: ClsStubBuilderContext) {
|
||||
if (!type.hasClassName() && !type.hasTypeAliasName()) return emptySet()
|
||||
|
||||
val result = hashSetOf<KtModifierKeywordToken>()
|
||||
val classId = c.nameResolver.getClassId(if (type.hasClassName()) type.className else type.typeAliasName)
|
||||
|
||||
if (classId.asSingleFqName().toUnsafe().getFunctionalClassKind() == FunctionClassDescriptor.Kind.SuspendFunction) {
|
||||
if (Flags.SUSPEND_TYPE.get(type.flags)) {
|
||||
result.add(KtTokens.SUSPEND_KEYWORD)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user