Segmentation fault while type checking complex expression
Originator: | giannis | ||
Number: | rdar://49478786 | Date Originated: | Apr 1, 2019 |
Status: | Open | Resolved: | |
Product: | Xcode | Product Version: | 10.2 |
Classification: | Reproducible: |
Please provide a descriptive title for your feedback Segmentation fault while type checking complex expression Which product are you seeing an issue with? Developer Tools Which area are you seeing an issue with? Description Please describe the issue and what steps we can take to reproduce it Summary: When trying to type check a complex expression the editor crashes Steps to Reproduce: Using this extension extension Array where Element == URLQueryItem { subscript(name: String) -> String? { return first(where: { $0.name == name })?.value } } if let ids = URLComponents(url: url, resolvingAgainstBaseURL: true)?.queryItems?["ids"]?.split(separator: ",").flatMap(Int.init) { // do stuff } the editor crashes Even if I include the correct type, it still crashes if let ids: [Int] = URLComponents(url: url, resolvingAgainstBaseURL: true)?.queryItems?["ids"]?.split(separator: ",").flatMap(Int.init) { // do stuff } Expected Results: The editor should resolve the type to Array<Int> Actual Results: The editor crashes with segmentation fault 11 Version/Build: Xcode Version 10.2 (10E125) Configuration: MacBook Pro Retina 15 Mid 2012 macOS Mojave 10.14.4 (18E226)
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!