Swift: compiler crash
| Originator: | garth | ||
| Number: | rdar://21611591 | Date Originated: | 30-Jun-2015 08:25 AM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 7b2 |
| Classification: | Serious Bug | Reproducible: | Always |
This Swift code makes the compiler reproducibly crash on my machine. Works in a playground or a regular source file.
extension SequenceType {
func invert<Key, Value: Hashable where Generator.Element == (Key, Value)>() -> [Value: Key] {
var inverted = [Value: Key]()
for item in self {
let (key, value) = item as! (Key, Value)
inverted[value] = key
}
return inverted
}
}
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!