-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[CS] Unify ReturnStmt handling #71272
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
Conversation
83b2053
to
0da6c25
Compare
Source compat run passed except for an issue that looks unrelated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
This wasn't consistently used, and consequently could result in some expressions getting their parents invalidated. Instead, replace it with a query to make sure we don't try and add an expression we've already computed the parent info for.
Unify the implementation between single-expression and multi-statement closures. Because we're now storing a contextual type for single expression closure returns, update a code completion test to bring its behavior inline with the multi-statement case.
0da6c25
to
deaf2dd
Compare
@swift-ci please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change in code completion behavior looks reasonable to me.
Unify the implementation between single-expression and multi-statement closures. Because we're now storing a contextual type for single expression closure returns, update a code completion test to bring its behavior inline with the multi-statement case.