[SR-14601] Code completion always ends up in the fallback case when completing inside result builders #56953
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
code completion
Area → source tooling: code completion
source tooling
Area: IDE support, SourceKit, and other source tooling
Additional Detail from JIRA
md5: ff39bc29921815d28dc2ea00efd8f411
Issue Description:
When completing inside a result builder, AFAICT we are generating the constraint system directly from the result builder’s body without ever through
typeCheckExpression
. Because of this, we never calltypeCheckForCodeCompletion
during the initial type check here.Thus, we don’t receive a
sawSolution
callback in the CodeCompletionCallbacks and end up in the fallback case here.We should have a code completion hook inside the result builder transformer that calls the code completion callbacks appropriately, so we don’t end up in the fallback case.
To reproduce this, add a breakpoint (or fail otherwise) in
DotExprTypeCheckCompletionCallback:: fallbackTypeCheck
and run the followingThe text was updated successfully, but these errors were encountered: