Skip to content

[4.1] DefiniteInitialization: Storing back to the 'self' box in a class init is OK. #14395

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

jckarter
Copy link
Contributor

@jckarter jckarter commented Feb 3, 2018

Explanation: Fixes a regression where spurious "self used before super.init" errors would occur when an argument to a self.init or super.init delegation threw.

Scope: Regression from 4.0

Issue: rdar://problem/37007554

Risk: Low, small bug fix

Testing: Swift CI, test case from Radar

…t is OK.

SILGen does this now to maintain ownership balance when a class initializer delegation gets interrupted, such as by an error propagation through one of the arguments to the delegatee. Fixes rdar://problem/37007554 .
@jckarter
Copy link
Contributor Author

jckarter commented Feb 3, 2018

@swift-ci Please test

@jckarter
Copy link
Contributor Author

jckarter commented Feb 3, 2018

@gottesmm Does this look ok for 4.1?

@jckarter jckarter requested a review from gottesmm February 3, 2018 18:08
@gottesmm
Copy link
Contributor

gottesmm commented Feb 3, 2018

SIL test case?

@jckarter
Copy link
Contributor Author

jckarter commented Feb 3, 2018

DI is so tightly coupled to SILGen output that I think SIL test cases are useless for it.

@jckarter jckarter merged commit 6618eb5 into swiftlang:swift-4.1-branch Feb 6, 2018
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