Hamish Knight
d7fc22aaca
[IDE] Simplify isImplicitSingleExpressionReturn
...
Use the generalized implied result logic, and
rename to `isImpliedResult` since that's really
what we're querying here, and it needs to handle
implicit-last-exprs if enabled.
2024-02-07 18:14:23 +00:00
Hamish Knight
3d06f0d7c0
[CodeComplete] Improve ExpectsNonVoid computation
...
If we know we have a Void expected type, don't set
`ExpectsNonVoid` to `true`.
2024-01-29 21:26:08 +00:00
Alex Hoppen
b603a5e9a0
[Sema] Remove LeaveClosureBodiesUnchecked
...
This shouldn’t be needed anymore since we migrated code completion to be solver-based.
rdar://91403086
2023-11-23 11:41:29 -08:00
Holly Borla
97f1e617fd
[Concurrency] Replace ClosureActorIsolation with ActorIsolation throughout
...
the isolation query APIs.
2023-09-16 12:21:36 -07:00
Alex Hoppen
acc6c10344
Merge pull request #68075 from ahoppen/ahoppen/labeled-trailing-closure-solver-based
...
[CodeCompletion] Migrate labeled trailing closure completions to solver-based
2023-09-06 13:10:56 -07:00
Alex Hoppen
a1bfb510e1
[CodeCompletion] Migrate labeled trailing closure completions to solver-based
...
rdar://113472967
2023-08-24 15:41:36 -07:00
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
4702f82914
[CodeCompletion] Check getContextualType in getTypeForCompletion
2023-08-24 08:48:36 -07:00
Alex Hoppen
5d201131c1
[CodeCompletion] Migrate yield completions to solver-based
...
We didn’t actually have any tests for this. Completions aren’t great here at the moment but since this is an underscored language feature it’s not that important at the moment.
2023-08-23 13:07:56 -07:00
Alex Hoppen
3670b16754
[CodeCompletion] Migrate completion of ReturnStmtExpr to solver-based
2023-08-23 13:07:56 -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