Skip to content
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

Machine files raise lots of errors with -Wnullable-to-nonnull-conversion #336

Closed
ibsh opened this issue May 31, 2016 · 1 comment
Closed

Comments

@ibsh
Copy link

ibsh commented May 31, 2016

With the introduction of proper nullability in Objective-C machine consumption headers (thank you!), there are multiple errors raised with the -Wnullable-to-nonnull-conversion flag (which my team has adopted for ease of adding Swift to our legacy Objective-C codebase). For example (and this is almost certainly not exhaustive):

  1. All implementations of +entityInManagedObjectContext: are invalid, as the internal NSEntityDescription#entityForName:inManagedObjectContext: call has a nullable return
  2. Implementations of CoreDataGeneratedAccessors are invalid for nullable collection properties

I guess for 1), it would be best to mark +entityInManagedObjectContext: as nullable.
Conditional code will be necessary for 2).

@rentzsch
Copy link
Owner

Thanks!

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

No branches or pull requests

2 participants