msmtamburro commented on pull request #1050:
URL: https://github.com/apache/cordova-ios/pull/1050#issuecomment-758135910


   > > > Adding `nullable` to the new method tells the consumer to expect that 
this method can return null. One could go through and update all of the 
previous methods with appropriate nullability specifiers at some point in the 
future.
   > > 
   > > 
   > > You've changed `initWithFrame:` to have `nullable` too:
   > > ```objc
   > > - (nullable instancetype)initWithFrame:(CGRect)frame;
   > > ```
   > > 
   > > 
   > > Will existing plugins that implement it without `nullable` run into 
compiler errors?
   > > i.e., 
https://github.com/ionic-team/cordova-plugin-ionic-webview/blob/master/src/ios/CDVWKWebViewEngine.m#L117
   > 
   > They may possibly see a warning (depending on project setup, and language 
used), but it is a good warning regarding unchanged code. The existing code 
could have always returned nil here. It should not stop anyone from compiling, 
even if they are treating warnings as errors in their own project.
   
   I took a moment to go through existing (unchanged) methods that fall under 
the assumed "nonnull" but can actually return nil, and explicitly marked them 
as "nullable," so there's less ambiguity.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to