Skip to content

[Definite Initialization] Fix a bug that made DI wrongly think that an unused access to "self" in a delegating initializer is a use of the form: type(of:self) #25403

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
merged 1 commit into from
Jun 13, 2019

Conversation

ravikandhadai
Copy link
Contributor

rdar://51198592

This fixes a bug in the function collectDelegatingInitUses that classifies uses of an uninitialized memory location. The code that had to check that every use of a load_borrow inst (expect the corresponding end_borrow) was in a ValueMetatypeInst did not consider the case where there is no use of the load_borrow at all.

that an unused access to "self" in a delegating initializer is a use
of the form: `type(of:self)`

<rdar://51198592>
@ravikandhadai ravikandhadai changed the title [Definite Initialization] Fix a bug that made the DI wrongly think that an unused access to "self" in a delegating initializer is a use of the form: type(of:self) [Definite Initialization] Fix a bug that made DI wrongly think that an unused access to "self" in a delegating initializer is a use of the form: type(of:self) Jun 12, 2019
@ravikandhadai
Copy link
Contributor Author

@swift-ci Please smoke test

Copy link
Contributor

@gottesmm gottesmm left a comment

Choose a reason for hiding this comment

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

LGTM!

@gottesmm
Copy link
Contributor

@swift-ci smoke test macOS platform

@gottesmm
Copy link
Contributor

@ravikandhadai we should put this in 5.1 as well.

@ravikandhadai ravikandhadai merged commit ff3d081 into swiftlang:master Jun 13, 2019
@jckarter
Copy link
Contributor

Thanks Ravi!

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