mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When completing within an InOutExpr like `&foo.<complete>`, we were forming a CodeCompletionExpr with a base when parsing the content of the InOutExpr and storing it in CodeCompletionCallbacksImpl::CodeCompleteTokenExpr. When the result of that parse contained a code completion though, we were dropping the sub-expression completely and forming an empty code completion result in place of the inout expression, which resulted in later code inserting a code completion expression with no base into the AST. The solver based completion was later asking for the type of the code completion and its base using the expression stored in CodeCompletionCallbacksImpl::CodeCompleteTokenExpr, but that never ended up in the AST so we hit an assertion about the expression not have a type in the formed solutions. Resolves rdar://75366814
4 lines
126 B
Swift
4 lines
126 B
Swift
// RUN: %swift-ide-test -code-completion -code-completion-token=COMPLETE -source-filename %s
|
|
|
|
if undefined(&self.#^COMPLETE^#
|