Skip to content

[CodeCompletion][Sema] Multiple improvements to prepare for migration of PostfixExprParen to solver-based #42006

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Mar 24, 2022

This is a collection of multiple changes, which I hope aren’t too controversial, that are needed to migrate PostfixExprParen to solver-based. It might make sense to look at the commits individually for review to see the scope of each change.

@ahoppen ahoppen requested review from rintaro and xedin March 24, 2022 17:16
ahoppen added 10 commits March 25, 2022 09:36
…or code completion

This makes sure we e.g. resolve dependent member types after we perform type variable to generic parameter substitutions for code completion
…ompletion token is the first one in a call

This makes sure we don't penalize overloads with no arguments when calling
```swift
func foo() {}
func foo(_ arg: Int) {}
foo(#^COMPLETE^#
```
… function type

During code completion, the function type may be a placeholder type. Don't crash in those cases.
…completion

We are doing global completion for function arguments, so we should also record the variable types determined by the solution.
@ahoppen ahoppen force-pushed the pr/prepare-for-migrate-postfixexprparen branch from 2e07ec1 to 2d7dbd3 Compare March 25, 2022 09:42
@ahoppen
Copy link
Member Author

ahoppen commented Mar 25, 2022

Removed on change (Don't increase the score for holes at the code completion token) from this PR because it was causing stress tester failures. I’m looking at addressing it in a separate PR.

@ahoppen
Copy link
Member Author

ahoppen commented Mar 25, 2022

@swift-ci Please SourceKit stress test

@ahoppen
Copy link
Member Author

ahoppen commented Mar 25, 2022

@swift-ci Please smoke test

@ahoppen
Copy link
Member Author

ahoppen commented Mar 25, 2022

@swift-ci Please smoke test macOS

@xedin
Copy link
Contributor

xedin commented Mar 25, 2022

@swift-ci please smoke test macOS platform

@ahoppen ahoppen merged commit 0ded798 into swiftlang:main Apr 3, 2022
@ahoppen ahoppen deleted the pr/prepare-for-migrate-postfixexprparen branch April 3, 2022 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants