Xcode 7 Swift 2 migration tool misses API changes

Originator:cpickslay
Number:rdar://22832553 Date Originated:9/23/15
Status:Open Resolved:
Product:Xcode Product Version:7
Classification:Other Bug Reproducible:Always
 
Summary:
The swift 2 migration tool misses a number of API and language changes, which leads to a lot of manual post-migration cleanup.

Steps to Reproduce:
1) Open a swift 1.2 project
2) Select Edit->Convert->To Latest Swift Syntax...

Expected Results:
@objc(<argument>) class annotations should be removed
[kUTTypeImage] should be corrected to [kUTTypeImage as String]
UITableView.indexPathsForVisibleRows() should be corrected to UITableView.indexPathsForVisibleRows
UITableView.visibleCells() should be corrected to UITableView.visibleCells
UIView.setTranslatesAutoresizingMaskIntoConstraints(false) should be corrected to UIView.translatesAutoresizingMaskIntoConstraints = false
UIViewKeyframeAnimationOptions.allZeros should be corrected to UIViewKeyframeAnimationOptions()
UIButton.buttonWithType(.Custom) should be corrected to UIButton(type: .Custom)



Actual Results:
@objc(<argument>) class annotations changed to (<argument>)
[kUTTypeImage] left unchanged
UITableView.indexPathsForVisibleRows() left unchanged
UITableView.visibleCells() left unchanged
UIView.setTranslatesAutoresizingMaskIntoConstraints(false) left unchanged
UIViewKeyframeAnimationOptions.allZeros left unchanged
UIButton.buttonWithType(.Custom) left unchanged


Version:
Xcode 7.0, OS X 10.10.5

Notes:


Configuration:


Attachments:

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!