mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CodeCompletion] Fix assertion failure with curried function
Remove some untested broken code that I am fairly sure could never find the correct FunctionDecl. rdar://problem/22688199 Swift SVN r32000
This commit is contained in:
@@ -3332,11 +3332,6 @@ void CodeCompletionCallbacksImpl::doneParsing() {
|
||||
|
||||
case CompletionKind::PostfixExprParen: {
|
||||
Lookup.setHaveLParen(true);
|
||||
ValueDecl *VD = nullptr;
|
||||
if (auto *AE = dyn_cast<ApplyExpr>(ParsedExpr)) {
|
||||
if (auto *DRE = dyn_cast<DeclRefExpr>(AE->getFn()))
|
||||
VD = DRE->getDecl();
|
||||
}
|
||||
CodeCompletionTypeContextAnalyzer TypeAnalyzer(CurDeclContext,
|
||||
CodeCompleteTokenExpr);
|
||||
llvm::SmallVector<Type, 2> PossibleTypes;
|
||||
@@ -3344,7 +3339,7 @@ void CodeCompletionCallbacksImpl::doneParsing() {
|
||||
Lookup.setExpectedTypes(PossibleTypes);
|
||||
}
|
||||
if (ExprType)
|
||||
Lookup.getValueExprCompletions(*ExprType, VD);
|
||||
Lookup.getValueExprCompletions(*ExprType);
|
||||
if (!Lookup.FoundFunctionCalls ||
|
||||
(Lookup.FoundFunctionCalls &&
|
||||
Lookup.FoundFunctionsWithoutFirstKeyword)) {
|
||||
|
||||
Reference in New Issue
Block a user