Migration to modern ObjC subscripting syntax should replace `removeObjectForKey:` with `= nil`

Number:rdar://25617791 Date Originated:April 8 2016, 11:14 AM
Status:Closed Resolved:August 16 2017, 12:13 PM
Product:Developer Tools Product Version:
Classification:Enhancement Reproducible:Always
Feature is:
Xcode -> Edit -> Convert -> To Modern Objective-C Syntax... -> ObjC subscripting

Enhancement desired is to support rewriting `removeObjectForKey:` to the following modern syntax: `dictionary[key] = nil;`

Steps to Reproduce:
1. Input this line in your code:
[[NSMutableDictionary dictionary] removeObjectForKey:@"foo"];

2. Use: Xcode -> Edit -> Convert -> To Modern Objective-C Syntax... -> ObjC subscripting

Expected Results:
Line of code is expected to become:
[NSMutableDictionary dictionary][@"foo"] = nil;

Actual Results:
Line of code is unchanged.

Xcode Version 7.3 (7D175)


Apple Developer Relations August 16 2017, 12:13 PM We are not planning to do more work for the ARC migrator.

Thank you for your feedback, it is noted. Engineering has determined that there are currently no plans to address this issue.

We are now closing this bug report.

By adigitalknight at April 11, 2018, 2:48 a.m. (reply...)

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!