Commit Graph

12 Commits

Author SHA1 Message Date
Alex Hoppen
72cadecf21 [CodeCompletion] Split result delivery into a result colleciton and consumer phase
This will allow us to run two different completion kinds and deliver results from both of them.

Also: Compute a unified type context for global lookup. Previously, we always used the expected type context of the last lookup. But really, we should be considering all possible types from all constraint system solutions when computing code completion results from the cache.
2023-08-24 15:41:36 -07:00
Alex Hoppen
f2017b82ac [IDE] Don't fallback type check if the completion expression is inside a closure 2023-07-07 19:51:01 +02:00
Alex Hoppen
71937667f2 [IDE] Don’t return any result if the base expression’s type in postfix completion couldn’t be inferred 2023-07-07 19:51:01 +02:00
Alex Hoppen
d3270c1476 [CodeCompletion] Calling a static function on a type is not unapplied 2023-07-07 19:51:01 +02:00
Alex Hoppen
00eaed3af9 [CodeCompletion] Migrate postfix expr completion to solver-based 2023-07-07 19:51:01 +02:00
Alex Hoppen
6cec68e302 [IDE] Ignore score kinds that represent implicit conversions when solving for code completion
Ignore conversion score increases during code completion to make sure we don't filter solutions that might start receiving the best score based on a choice of the code completion token.
2023-07-07 19:50:46 +02:00
Hamish Knight
54c2fbf6f3 [CS] NFC: Add Solution::getTargetFor 2023-03-07 15:16:34 +00:00
Hamish Knight
2976edbe20 [CS] Rename SolutionApplicationTarget -> SyntacticElementTarget 2023-03-06 20:54:06 +00:00
Alex Hoppen
ff7e11c83f [CodeComplete] Fix crash when completing in a string literal in a result builder 2023-02-14 09:40:56 +01:00
Alex Hoppen
9f4e1926b6 [CodeCompletion] Use type from solution to determine actor isolation 2023-02-14 09:40:56 +01:00
Alex Hoppen
26e237c4ae [CodeCompletion] Disallow void when code completion expr is a solution application target whose result is not unused
This happens if the code completion expression initializes a variable in a multi-statement closure that doesn’t have LeaveClosureBodiesUnchecked set.
2023-02-14 09:40:55 +01:00
Alex Hoppen
803e667024 [CodeCompletion] Rename DotExprCompletion -> PostfixCompletion 2022-07-01 15:57:54 +02:00