Swift: A swiftc Crash
| Originator: | DaNmarner | ||
| Number: | rdar://22205977 | Date Originated: | 09-Aug-2015 02:27 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 7 Beta 5 |
| Classification: | Other Bug | Reproducible: | Always |
Summary:
Swift shipped with Xcode 7 beta 5 crashes while trying to compile this code.
Steps to Reproduce:
protocol EventReceiver : Equatable {}
enum Event: Hashable {}
final class EventCenter {
func deregister(receiver: EventReceiver) {
registered.forEach { (k, v) in
self.registered[k] = v.filter { $0 != receiver }
}
}
private var registered: [Event: [EventReceiver]] = [:]
}
Expected Results:
swiftc should not crash (and report error properly).
Actual Results:
swiftc traps.
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!