FIR: resolve suspend lambda properly
This commit is contained in:
committed by
Mikhail Glukhikh
parent
88f81b9b71
commit
c26adf53dd
@@ -452,10 +452,19 @@ public abstract class KotlinBuiltIns {
|
||||
return getBuiltInClassByName(getFunctionName(parameterCount));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static String getSuspendFunctionName(int parameterCount) {
|
||||
return FunctionClassDescriptor.Kind.SuspendFunction.getClassNamePrefix() + parameterCount;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static ClassId getSuspendFunctionClassId(int parameterCount) {
|
||||
return new ClassId(COROUTINES_PACKAGE_FQ_NAME_RELEASE, Name.identifier(getSuspendFunctionName(parameterCount)));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public ClassDescriptor getSuspendFunction(int parameterCount) {
|
||||
Name name = Name.identifier(FunctionClassDescriptor.Kind.SuspendFunction.getClassNamePrefix() + parameterCount);
|
||||
return getBuiltInClassByFqName(COROUTINES_PACKAGE_FQ_NAME_RELEASE.child(name));
|
||||
return getBuiltInClassByFqName(COROUTINES_PACKAGE_FQ_NAME_RELEASE.child(Name.identifier(getSuspendFunctionName(parameterCount))));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user