Check default parameters of expect suspend functions on original
functions instead of function views. #KT-24461 Fixed
This commit is contained in:
@@ -1323,7 +1323,9 @@ public class FunctionCodegen {
|
||||
|
||||
private boolean isDefaultNeeded(@NotNull FunctionDescriptor descriptor, @Nullable KtNamedFunction function) {
|
||||
List<ValueParameterDescriptor> parameters =
|
||||
CodegenUtil.getFunctionParametersForDefaultValueGeneration(descriptor, state.getDiagnostics());
|
||||
CodegenUtil.getFunctionParametersForDefaultValueGeneration(
|
||||
descriptor.isSuspend() ? CoroutineCodegenUtilKt.unwrapInitialDescriptorForSuspendFunction(descriptor) : descriptor,
|
||||
state.getDiagnostics());
|
||||
return CollectionsKt.any(parameters, ValueParameterDescriptor::declaresDefaultValue);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user