Skip to content

[5.7] Sema: Fix availability checking in function default argument closure expressions #59472

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

tshortli
Copy link
Contributor

When building the TypeRefinementContext tree, delay pushing a decl's body context until the body Stmt is actually encountered by the ASTWalker. This ensures that default argument expressions do not automatically inherit the availability context of the function body.

Resolves rdar://95148645

…expressions.

When building the TypeRefinementContext tree, delay pushing a decl's body context until the body Stmt is actually encountered by the `ASTWalker`. This ensures that default argument expressions do not automatically inherit the availability context of the function body.

Resolves rdar://95148645
@tshortli tshortli requested a review from nkcsgexi June 15, 2022 22:04
@tshortli tshortli requested a review from a team as a code owner June 15, 2022 22:04
@tshortli
Copy link
Contributor Author

@swift-ci please test

@tshortli tshortli merged commit 0691f60 into swiftlang:release/5.7 Jun 16, 2022
@tshortli tshortli deleted the build-default-argument-expr-trcs-5.7 branch June 16, 2022 18:33
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.

2 participants