Skip to content

SILGen: Fix for 'try?' leaking the error value #1740

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

Closed
wants to merge 2 commits into from

Conversation

slavapestov
Copy link
Contributor

No description provided.

@slavapestov
Copy link
Contributor Author

@swift-ci Please fix


enum Markings { case Tuxedo, Tortoise }

class Cat : Equatable {
Copy link
Contributor

Choose a reason for hiding this comment

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

I like cats, but StdlibUnittest provides LifetimeTracked type for leak checking. And the harness automatically checks that LifetimeTracked.instances == 0 at the end of every test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! And I'm glad we both agree on the cat part too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Tortoise == naughty.

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@natecook1000
Copy link
Member

@swift-ci Please fix

If only this worked...

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

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
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@gparker42
Copy link
Contributor

@swift-ci Please fix

If only this worked...

Let me try something…
@swift-ci Please implement "@swift-ci Please fix"

@dduan
Copy link
Contributor

dduan commented Mar 21, 2016

I'm guessing this won't make it into Xcode 7.3 GM…?

@slavapestov slavapestov deleted the try-optional-fix branch March 24, 2016 09:27
@dduan
Copy link
Contributor

dduan commented Mar 25, 2016

May I suggest this one being cherry-picked for the (potential) 2.2.1 release? It'll have big impact in our production code.

Thanks for your consideration 🙇.

@tkremenek @DougGregor

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.

6 participants