Skip to content

Commit c3d0bae

Browse files
committed
lookup fallback
1 parent 0e10437 commit c3d0bae

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/IDE/ExprCompletion.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,12 @@ void ExprTypeCheckCompletionCallback::collectResults(
119119
UnifiedCanHandleAsync |= Result.IsInAsyncContext;
120120
}
121121

122+
// If we didn't find any results, at least try to collect unqualified results.
123+
if (Results.empty()) {
124+
Lookup.getValueCompletionsInDeclContext(CCLoc);
125+
Lookup.getSelfTypeCompletionInDeclContext(CCLoc, /*isForDeclResult=*/false);
126+
}
127+
122128
collectCompletionResults(CompletionCtx, Lookup, DC, UnifiedTypeContext,
123129
UnifiedCanHandleAsync);
124130
}

0 commit comments

Comments
 (0)