Skip to content

[PrintAsObjC] Silence -Wnullability for the generated declarations. #10247

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

jrose-apple
Copy link
Contributor

Since Swift 3 and Swift 4 might have different views of an Objective-C API's nullability, we can end up with incompatible overrides, including with inherited initializers. This is unfortunate but also realistic; the Swift 3 code is not set up to handle the new nullability used by Swift 4 and Objective-C. Just silence the warning.

(It would be nice to not print inherited initializers at all, but that would mean making sure there are no convenience initializers we have to print as well. Otherwise the class would get mistaken for one without explicit designated initializers.)

rdar://problem/32571301

Since Swift 3 and Swift 4 might have different views of an Objective-C
API's nullability, we can end up with incompatible overrides,
including with inherited initializers. This is unfortunate but also
realistic; the Swift 3 code is /not/ set up to handle the new nullability
used by Swift 4 and Objective-C. Just silence the warning.

(It would be nice to not print inherited initializers at all, but that
would mean making sure there are no convenience initializers we have
to print as well. Otherwise the class would get mistaken for one
without explicit designated initializers.)

rdar://problem/32571301
@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test

Copy link
Member

@milseman milseman left a comment

Choose a reason for hiding this comment

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

LGTM

@jrose-apple jrose-apple merged commit bd0cb3d into swiftlang:master Jun 14, 2017
@jrose-apple jrose-apple deleted the nullability-fragility-compatibility branch June 14, 2017 20:50
jrose-apple added a commit to jrose-apple/swift that referenced this pull request Jun 14, 2017
…wiftlang#10247)

Since Swift 3 and Swift 4 might have different views of an Objective-C
API's nullability, we can end up with incompatible overrides,
including with inherited initializers. This is unfortunate but also
realistic; the Swift 3 code is /not/ set up to handle the new nullability
used by Swift 4 and Objective-C. Just silence the warning.

(It would be nice to not print inherited initializers at all, but that
would mean making sure there are no convenience initializers we have
to print as well. Otherwise the class would get mistaken for one
without explicit designated initializers.)

rdar://problem/32571301
@DougGregor
Copy link
Member

LGTM, thank you

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