Skip to content

[5.5][TypeChecker] Clear param specifiers before re-typechecking expression for completion #37310

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 7, 2021

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented May 7, 2021

Cherry-picking #36992 to 5.5


Because we are completing inside a result builder, we are never calling into typeCheckExpression and thus never call into typeCheckForCodeCompletion before fallbackTypeCheck (SR-14601).

This works fine in most cases, but in the added test case, we are hitting an assertion because the specifiers are not correctly erased from the ClosureExpr before re-typechecking for completion. Erasing them before fixes the test case until the underlying issue described above is fixed.

Fixes rdar://76710904 [SR-14494]

…n for completion

Because we are completing inside a result builder, we are never calling into `typeCheckExpression` and thus never call into `typeCheckForCodeCompletion` before `fallbackTypeCheck` (SR-14601).

This works fine in most cases, but in the added test case, we are hitting an assertion because the specifiers are not correctly erased from the `ClosureExpr` before re-typechecking for completion. Erasing them before fixes the test case until the underlying issue described above is fixed.

Fixes rdar://76710904 [SR-14494]
@ahoppen ahoppen requested a review from akyrtzi May 7, 2021 12:12
@ahoppen ahoppen requested a review from a team as a code owner May 7, 2021 12:12
@ahoppen
Copy link
Member Author

ahoppen commented May 7, 2021

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented May 7, 2021

Build failed
Swift Test OS X Platform
Git Sha - 5fd5574

@ahoppen
Copy link
Member Author

ahoppen commented May 7, 2021

macOS timed out. Meant to request macOS testing again, but accidentally requested all.

@swift-ci Please test

@ahoppen ahoppen added the r5.5 label May 7, 2021
@akyrtzi akyrtzi merged commit d781a94 into swiftlang:release/5.5 May 7, 2021
@ahoppen ahoppen deleted the pr-5.5/wrapping-lvalue branch May 17, 2021 17:11
@AnthonyLatsis AnthonyLatsis added swift 5.5 🍒 release cherry pick Flag: Release branch cherry picks labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants