Skip to content

ClangImporter: Fix init kind computation with overridden constructors #28025

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
Nov 3, 2019

Conversation

slavapestov
Copy link
Contributor

We used to compute the init kind from the overridden declaration;
this was switched to use the base declaration in 42f72cb.

Refactor the init kind computation a little to get the old behavior
back. Otherwise, if a class defines an initializer named -init, we
always import it as designated by virtue of overridding NSObject's
-init.

Fixes rdar://problem/56674158.

We used to compute the init kind from the overridden declaration;
this was switched to use the base declaration in 42f72cb.

Refactor the init kind computation a little to get the old behavior
back. Otherwise, if a class defines an initializer named -init, we
always import it as designated by virtue of overridding NSObject's
-init.

Fixes <rdar://problem/56674158>.
@slavapestov slavapestov requested a review from beccadax November 1, 2019 22:54
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov slavapestov merged commit 8a45e7d into swiftlang:master Nov 3, 2019
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.

1 participant