Swift 2.3 migrator removes argument labels from subscripts

Originator:keithbsmiley
Number:rdar://26886587 Date Originated:19-Jun-2016 22:58
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 8 beta 1
Classification:Other Bug Reproducible:Always
 
Summary:
When migrating our codebase from Swift 2.2 -> Swift 2.3 we noticed that when you have a custom subscript with a argument label, the argument label was stripped.

Steps to Reproduce:
1. Define a function such as in Swift 2.2:

```
public subscript(safe index: Int) -> Iterator.Element? {
```

2. Migrate it to Swift 2.3



Expected Results:
Nothing else with a line calling this would change.

Actual Results:
The `safe:` is removed, and replaced with the default subscript syntax.

Version:
Xcode 8 beta 1

Notes:
In our case this is a very frightening bug as the resulting code would still compile correctly, but would no longer be "safe"

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!