Swift: Compiler crash with enum case with parameterized type & closure
| Originator: | rix.rob | ||
| Number: | rdar://18248167 | Date Originated: | 05-Sep-2014 03:39 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode6-Beta7 (6A280n) |
| Classification: | Serious Bug | Reproducible: | Always |
Summary:
A generic enum with a case which has a parameterized type & a closure crashes the compiler
Steps to Reproduce:
1. Write this code:
enum S<T> {
case C(T, () -> ())
}
2. Attempt to compile it.
Expected Results:
I expected it to compile.
Actual Results:
It crashes.
Regression:
If the case does not have the type parameter, it does not crash.
If the case does not have the closure, it does not crash.
If the type parameter is boxed up in a class, it does not crash.
If the type parameter is the return type of a closure, it does not crash.
If the closure is replaced with a class or struct or basically anything else, it does not crash.
If you gaze at it, longingly, across a crowded room, it still crashes.
Notes:
Stack trace to follow.
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!