Skip to content

[Type checker] Look through optionals when checking for rethrows. #17622

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

DougGregor
Copy link
Member

Fixes SR-5427.

@DougGregor DougGregor force-pushed the fix-optional-rethrows-checking branch from f7a0958 to 534681a Compare June 29, 2018 05:50
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

huonw
huonw previously approved these changes Jun 29, 2018
@DougGregor DougGregor force-pushed the fix-optional-rethrows-checking branch from 534681a to 932e9be Compare June 29, 2018 16:35
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

My earlier fix was incorrect. Asking for a re-review

@DougGregor DougGregor dismissed huonw’s stale review June 29, 2018 16:46

My fix was incorrect; the new approach is different and needs re-review.

@@ -134,6 +134,9 @@ class AbstractFunction {
fn = conversion->getSubExpr()->getValueProvidingExpr();
} else if (auto conversion = dyn_cast<BindOptionalExpr>(fn)) {
fn = conversion->getSubExpr()->getValueProvidingExpr();
// Look through optional injections
Copy link
Contributor

Choose a reason for hiding this comment

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

For consistency, this should end in a period.

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed. I'll tack that on in some other random PR I land today

@DougGregor DougGregor merged commit e7ee53b into swiftlang:master Jun 29, 2018
@DougGregor DougGregor deleted the fix-optional-rethrows-checking branch June 29, 2018 17:22
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