-
Notifications
You must be signed in to change notification settings - Fork 189
Add (backward compatible) generic parametrization and nullability #113
base: master
Are you sure you want to change the base?
Conversation
|
This is awesome, I want this, @supermarin can we get this merged and a release made please? In #101 you said you were waiting on this for a release 👯 |
|
Thank you @tomquist for the great work and @orta for pinging. I checked out and verified this code, and the same compiler bugs are still there since time I was trying to get this achieved. Namely, if you look at this test it should warn or fail the compilation. Regardless of the fact above, I'm in favor of merging this as the compiler bug (nullability validation in Objc blocks) is not ObjectiveSugar's fault and might be resolved on it's own. Until then, this is pretty useless unless I'm doing something wrong. Before merging, @tomquist would you mind updating the test code / project settings to affect your changes and use the nullability stuff? On the side note, I'd even be open of removing the compatibility stuff and just rolling the Generics/Nullability for 2.0. |
|
@supermarin Could you please further explain what nullability validation bug you mean. I enabled nullability warnings in the project and updated the test code to use the nullability stuff. However, I get warnings as expected. The test you mentioned doesn't produce a warning because I declared the return value of the In contrast to |
|
I think |
|
👍 ace |

This pull request adds generics to all Array/Set/Dictionary methods and nullability modifiers in a backward compatible way.