specifying nullability of block parameters breaks type completion
Originator: | james.walter.matthews | ||
Number: | rdar://21108595 | Date Originated: | 26-May-2015 03:29 PM |
Status: | Open | Resolved: | |
Product: | Developer Tools | Product Version: | 6.3.2 (6D2105) |
Classification: | UI/Usability | Reproducible: | Always |
Summary: Indicating that a method's block parameter is non-nullable breaks Xcode's ability to type-complete calls to the method. Leaving out the nullability specification results in a warning. Steps to Reproduce: 1. Open attached sample project, CrossLanguageTypeComplete 2. Open MyObjCClass.m for editing 3. Put the insertion point at the end of line 22, which begins "[self myMetho" and type the character "d" 4. Two type completion options appear, myMethod1 and myMethod2. Choose myMethod1 5. Hit Return to expand the block parameter into a code template Expected Results: I expect to see: [self myMethod1:^NSObject * __nonnull(NSString * __nonnull argument) { code } with the word "code" selected. Actual Results: I see: [self myMethod1:(MyTaskBlock1 __nonnull()block with "(MyTaskBlock1 __nonnull()block" selected Version: Xcode 6.3.2 (6D2105), OS X 10.10.3 (14D136) Notes: Xcode correctly type-completes calls to myMethod2, which does not indicate the nullability of its block parameter. As a result, it generates a warning: /Users/matthews/Source/Experiments/CrossLanguageTypeComplete2/CrossLanguageTypeComplete/CrossLanguageTypeComplete/MyObjCClass.h:18:37: Block pointer is missing a nullability type specifier (__nonnull or __nullable) Configuration: Attachments: 'CrossLanguageTypeComplete.zip' was successfully uploaded.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Duplicate of 20755276 (Open)