-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Swift 2.2.1] [SILGen] Fix for 'try?' leaking the error value #1886
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
[Swift 2.2.1] [SILGen] Fix for 'try?' leaking the error value #1886
Conversation
@swift-ci test |
92f3379
to
d38dbc1
Compare
@swift-ci test |
|
||
ErrorHandlingTests.test("tryOptional") { | ||
expectEqual(LifetimeTracked(1), try? furball(false)) | ||
expectEqual(Optional<LifetimeTracked>.none, try? furball(true)) |
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.
This test is written for Swift 3. I believe changing it to .None
will make the test pass.
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.
Yup, missed that one.
d38dbc1
to
563859b
Compare
@tkremenek Tests should be passing now, apologies for the noise |
@swift-ci test |
563859b
to
3d82ffd
Compare
The error is passed in to the catch block as a +1 value but we were just dropping it on the floor. Fixes https://bugs.swift.org/browse/SR-972
3d82ffd
to
4349b89
Compare
@swift-ci test and merge |
Apparently cc @shahmishal |
@swift-ci test |
Makes sense for |
…-assertions Disable assertions for both target and host toolchain in 5.3 branch
What's in this pull request?
Backport the fix for
try?
memory leakage to Swift 2.2. This was the original PR to master: #1740. @tkremenek please consider merging it for a 2.2.x release.Resolved bug number: (SR-972)
Before merging this pull request to apple/swift repository:
Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
Validation Testing
Note: Only members of the Apple organization can trigger swift-ci.