File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -236,7 +236,18 @@ void ArgumentTypeCheckCompletionCallback::sawSolutionImpl(const Solution &S) {
236
236
for (auto Idx : range (0 , ParamsToPass.size ())) {
237
237
bool Optional = false ;
238
238
if (Info.ValueRef ) {
239
- if (const ParamDecl *DeclParam = getParameterAt (Info.ValueRef , Idx)) {
239
+ if (Info.ValueRef .getDecl ()->isInstanceMember () &&
240
+ !doesMemberRefApplyCurriedSelf (Info.BaseTy ,
241
+ Info.ValueRef .getDecl ())) {
242
+ // We are completing in an unapplied instance function, eg.
243
+ // struct TestStatic {
244
+ // func method() -> Void {}
245
+ // }
246
+ // TestStatic.method(#^STATIC^#)
247
+ // The 'self' parameter is never optional, so don't enter the check
248
+ // below (which always assumes that self has been applied).
249
+ } else if (const ParamDecl *DeclParam =
250
+ getParameterAt (Info.ValueRef , Idx)) {
240
251
Optional |= DeclParam->isDefaultArgument ();
241
252
Optional |= DeclParam->getType ()->is <PackExpansionType>();
242
253
}
You can’t perform that action at this time.
0 commit comments