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

Improve nullable annotations for _ASDisplayLayer and _ASDisplayView #trivial #780

Merged
merged 1 commit into from
Feb 1, 2018

Conversation

maicki
Copy link
Contributor

@maicki maicki commented Jan 31, 2018

No description provided.

@@ -28,7 +30,7 @@
@discussion This property overrides the CALayer category method which implements this via associated objects.
This should result in much better performance for _ASDisplayLayers.
*/
@property (nonatomic, weak) ASDisplayNode *asyncdisplaykit_node;
@property (nullable, nonatomic, weak) ASDisplayNode *asyncdisplaykit_node;
Copy link
Member

Choose a reason for hiding this comment

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

Weak properties are nullable by default.

Copy link
Contributor Author

@maicki maicki Jan 31, 2018

Choose a reason for hiding this comment

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

I would rather go with the explicit case. You are right in theory the compiler is creating the exact same output, but if you look into Apple's header, e.g. UITableView.h weak properties like delegate or dataSource are still annotated with nullable.

Copy link
Member

Choose a reason for hiding this comment

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

👌

@maicki maicki merged commit 38b76e0 into master Feb 1, 2018
@maicki maicki deleted the MSImproveNullableAnnotationsInDisplayViewLayer branch September 8, 2018 16:33
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.

None yet

2 participants