[CodeCompletion] Fix a call to computeDefaultMap

Resolves SR-10795.
This commit is contained in:
Hamish Knight
2019-05-29 23:39:49 +01:00
parent dcabcb36b4
commit 2872210735
2 changed files with 4 additions and 3 deletions

View File

@@ -1457,9 +1457,8 @@ protocolForLiteralKind(CodeCompletionLiteralKind kind) {
/// that is of type () -> ().
static bool hasTrivialTrailingClosure(const FuncDecl *FD,
AnyFunctionType *funcType) {
SmallBitVector defaultMap =
computeDefaultMap(funcType->getParams(), FD,
/*level*/ FD->isInstanceMember() ? 1 : 0);
auto defaultMap = computeDefaultMap(funcType->getParams(), FD,
/*skipCurriedSelf*/ FD->hasCurriedSelf());
if (defaultMap.size() - defaultMap.count() == 1) {
auto param = funcType->getParams().back();