mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CodeCompletion] Fix issue causing the completion status to not be set correctly for pattern completion
We weren’t setting the code completion token status correctly when parsing patterns with code completion tokens. Because of this, in the added test case, the `searchSubject` gets added as a member of `Foo` twice - once in the first pass and once in the second pass, causing an assertion failure. Fixes rdar://80575116 [SR-14687]
This commit is contained in:
@@ -1138,7 +1138,7 @@ ParserResult<Pattern> Parser::parsePattern() {
|
||||
// code complete anything here -- we expect an identifier.
|
||||
consumeToken(tok::code_complete);
|
||||
}
|
||||
return nullptr;
|
||||
return makeParserCodeCompletionStatus();
|
||||
|
||||
case tok::kw_var:
|
||||
case tok::kw_let: {
|
||||
|
||||
Reference in New Issue
Block a user