Skip to content

Commit c236b8d

Browse files
committed
[CodeComplete] Remove a redundant bit of logic
`getTypeForCompletion` already falls back to the contextual type, and querying the ConstraintSystem for this is wrong since it may not be in the same state as it was when the Solution was produced.
1 parent b10560f commit c236b8d

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

lib/IDE/PostfixCompletion.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,6 @@ void PostfixCompletionCallback::sawSolutionImpl(
178178
auto *Locator = CS.getConstraintLocator(SemanticExpr);
179179
Type ExpectedTy = getTypeForCompletion(S, CompletionExpr);
180180
Expr *ParentExpr = CS.getParentExpr(CompletionExpr);
181-
if (!ParentExpr && !ExpectedTy)
182-
ExpectedTy = CS.getContextualType(CompletionExpr, /*forConstraint=*/false);
183181

184182
auto *CalleeLocator = S.getCalleeLocator(Locator);
185183
ValueDecl *ReferencedDecl = nullptr;

0 commit comments

Comments
 (0)