File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -3778,16 +3778,7 @@ static bool diagnoseContextualFunctionCallGenericAmbiguity(
3778
3778
TypeVariableType *typeVar) {
3779
3779
auto argParamMatch = argMatching->second .parameterBindings [argIdx];
3780
3780
auto param = applyFnType->getParams ()[argParamMatch.front ()];
3781
- if (param.isVariadic ()) {
3782
- auto paramType = param.getParameterType ();
3783
- // Variadic parameter is constructed as an ArraySliceType(which is
3784
- // just sugared type for a bound generic) with the closure type as
3785
- // element.
3786
- auto baseType = paramType->getDesugaredType ()->castTo <BoundGenericType>();
3787
- auto paramFnType = baseType->getGenericArgs ()[0 ]->castTo <FunctionType>();
3788
- return cs.typeVarOccursInType (typeVar, paramFnType->getResult ());
3789
- }
3790
- auto paramFnType = param.getParameterType ()->castTo <FunctionType>();
3781
+ auto paramFnType = param.getPlainType ()->castTo <FunctionType>();
3791
3782
return cs.typeVarOccursInType (typeVar, paramFnType->getResult ());
3792
3783
};
3793
3784
You can’t perform that action at this time.
0 commit comments