Commit Graph

4 Commits

Author SHA1 Message Date
Alex Hoppen
a5a17aa955 [tests] Add a %batch-code-completion lit substitution
I could never remember the command to run batch code completion tests. Add a lit substitution for it.
2023-09-18 13:57:49 -07:00
Alex Hoppen
32eff21977 [IDE] Remove "Begin completions" and "End completions" from test cases
These test lines weren't actually providing any value and were annoying to write. Let's jut remove them.
2023-03-22 09:07:17 -07:00
Alex Hoppen
20985eaecd [CodeCompletion] Don’t pass LeaveClosureBodiesUnchecked for solver-based code completion 2023-02-14 09:40:55 +01:00
Alex Hoppen
94a9876d39 [IDE] Show completion results if member is followed by trailing closure
When completing `items.#^COMPLETE^# { $0.content }`, we are stopping parsing of the expression after the code completion token and are thus left with `{ $0.content }` in `parseDeclVar`, which interprets the `{` as the start of an accessor clause, wrapping the entire variable in an accessor decl and thus causing code completion to not show any results.

To avoid this issue, consume any postfix expressions after the code completion token and discard them. This assures that the trailing closure gets consumed before it can be interpreted as an accessor decl.

Fixes rdar://77259087 [SR-14544]
2021-06-23 13:48:59 +02:00