Wrong Fix-it for missing * in block argument list

Originator:greg.cooksey
Number:rdar://21042144 Date Originated:2015-05-20
Status:Open Resolved:No
Product:Developer Tools Product Version:6.4
Classification:UI / Usability Reproducible:Always
 
Summary:
When I define a block that takes an object argument, but forget to include the '*' in the argument's definition, Xcode offers to fix it for me, but fixes it wrong.

^(NSObject obj) {
}

gets "fixed" to

^(*NSObject obj) {
}

Steps to Reproduce:
1. Declare an Objective-C block with an object parameter, but leave out the '*' before the parameter name:

^(NSObject obj) {
}

2. Wait for Xcode to show the error marker in the editor gutter
3. Click on the Fix-it

Expected Results:
Xcode inserts the '*' before the parameter name

Actual Results:
Xcode inserts the '*' before the parameter type

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!