Skip to content

[CS] Avoid creating placeholder var if skipping for completion #73705

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
merged 1 commit into from
May 17, 2024

Conversation

hamishknight
Copy link
Contributor

Otherwise we'd crash in CSApply since we'd have no type recorded for the var.

rdar://127838305

Otherwise we'd crash in CSApply since we'd have no
type recorded for the var.

rdar://127838305
@hamishknight
Copy link
Contributor Author

@swift-ci please test

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise we'd crash in CSApply

I’m a little surprised that we run CSApply at all. Code completion should just be inspecting the constraint system solution and not applying the solution. But maybe I’m missing something.

@ahoppen
Copy link
Member

ahoppen commented May 17, 2024

I’m a little surprised that we run CSApply at all. Code completion should just be inspecting the constraint system solution and not applying the solution. But maybe I’m missing something.

Never mind, I just realized that the result builder is not in the expression that we’re completing in, and we do expect the solution to be applied for all the other decls.

@hamishknight hamishknight enabled auto-merge May 17, 2024 18:18
@hamishknight hamishknight merged commit ebaa184 into swiftlang:main May 17, 2024
4 of 5 checks passed
@hamishknight hamishknight deleted the skip-placeholder branch May 17, 2024 22:23
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