mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CodeCompletion] Fix call-arg completion when we remove all the overloads we found
We have code for pruning unlikely overloads, but when it pruned all overloads it was treating that as if there was nothing to complete. Instead, fallback to postfix-expr-begin. We should also figure out why we're not getting any viable types here, but we need to handle failure gracefully. rdar://problem/24356118
This commit is contained in:
@@ -3505,8 +3505,10 @@ public:
|
||||
if (PossibleTypes.empty() &&
|
||||
!typeCheckUnresolvedExpr(DC, CallE->getArg(), CallE, PossibleTypes))
|
||||
return false;
|
||||
if (RemoveUnlikelyOverloads)
|
||||
if (RemoveUnlikelyOverloads) {
|
||||
removeUnlikelyOverloads(PossibleTypes, TupleEleTypesBeforeTarget, &DC);
|
||||
return !PossibleTypes.empty();
|
||||
}
|
||||
} else if (CallE->getArg()->getKind() == ExprKind::Paren) {
|
||||
Position = 0;
|
||||
HasName = false;
|
||||
|
||||
Reference in New Issue
Block a user