Xcode 6.1 (6A1052c): [Swift] Instantiating a value of a protocol type crashes the compiler
| Originator: | janoschhildebrand | ||
| Number: | rdar://18846252 | Date Originated: | 01-Nov-2014 |
| Status: | Closed | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 6.1 (6A1052c) |
| Classification: | Serious Bug | Reproducible: | Always |
Summary:
The following crashes the Swift compiler:
protocol P {
init()
}
let type = P.self
let val = type()
Steps to Reproduce:
Open the attached Xcode project & build
Expected Results:
The code should compiler successfully or at least produce an error message instead of crashing the compiler.
Actual Results:
The Swift compiler crashes.
Version:
Xcode 6.1 (6A1052c)
Swift version 1.1 (swift-600.0.54.20)
OSX 10.10 (14A389)
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!