Xcode 6.0 (6A280n): [Swift] Creating an instance of a generic class whose generic element type conforms to a protocol crashes the compiler
| Originator: | janoschhildebrand | ||
| Number: | rdar://18231256 | Date Originated: | 04-Sep-2014 |
| Status: | Closed | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 6.0 (6A280n) |
| Classification: | Serious Bug | Reproducible: | Always |
Summary:
The following code crashes the compiler:
class GenericClass<ValueType: Protocol> {
}
protocol Protocol {
}
// This crashes the compiler
var instance = GenericClass<Protocol>()
An example project and a crash report are attached.
Steps to Reproduce:
1. Open the attached project
2. Compile
3. Xcode shows an error indicating that the Swift compiler crashed
Expected Results:
The compiler should not crash
Actual Results:
The compiler crashes
Version:
Xcode Version 6.0 (6A280n)
Swift version 1.0 (swift-600.0.51.3)
OS X 10.9 (13E28)
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!