Swift initializers are not differentiated on their optionality or ability to throw

Originator:keithbsmiley
Number:rdar://23376549 Date Originated:03-Nov-2015 09:59 AM
Status:Closed (Won't fix) Resolved:
Product:Developer Tools Product Version:Swift 2.1
Classification:Other Bug Reproducible:Always
 
Summary:

Swift initializers are not differentiated based on their optionality or
ability to throw.

Steps to reproduce:

1. Create a swift struct/protocol/class
2. Create 3 initializers with the same argument, but one optional, and
   one that throws

OR

1. Open the attached playground

Expected results:

Everything compiles correctly, and the type is inferred based on the
caller.

Actual results:

A compiler error is produced:

```
Invalid redeclaration of 'init(string:)'
```

Notes:

- This is very similar to <rdar://23226135> but for initializers

Comments

https://github.com/keith/radars/blob/master/SwiftInitializerSignatureOverlap

By keithbsmiley at Nov. 3, 2015, 6 p.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!