mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Reapply "[CodeCompletion] Don't show the loop index before it is visible"
With the tests updated to account for not having the correct behaviour
for brace-stmt items from after the code-completion point. That part
turns out to be harder to fix.
This reverts commit a5325e6281.
This commit is contained in:
@@ -2463,8 +2463,6 @@ ParserResult<Stmt> Parser::parseStmtForEach(SourceLoc ForLoc,
|
||||
ParserResult<Expr> Where;
|
||||
if (consumeIf(tok::kw_where)) {
|
||||
Where = parseExprBasic(diag::expected_foreach_where_expr);
|
||||
if (Where.hasCodeCompletion())
|
||||
return makeParserCodeCompletionResult<Stmt>();
|
||||
if (Where.isNull())
|
||||
Where = makeParserErrorResult(new (Context) ErrorExpr(Tok.getLoc()));
|
||||
Status |= Where;
|
||||
|
||||
Reference in New Issue
Block a user