Xcode 6.2: swiftc crash when casting from protocol to any to object type
Originator: | segiddins | ||
Number: | rdar://20442279 | Date Originated: | 06-Apr-2015 04:53 PM |
Status: | Resolved | Resolved: | 13-Apr-2015 |
Product: | Developer Tools | Product Version: | Xcode 6.2 (6C131e) |
Classification: | Crash/Hang/Data Loss | Reproducible: | Always |
Summary: Swift crashes when attempting to compile the following code Steps to Reproduce: Attempt to compile the following swift code: import Foundation let x: NSCopying = NSURLComponents() (x as Any as NSURLComponents).query = "Hi" Expected Results: The code should compile Actual Results: Swift crashes, with the following output: Stack dump: 0. Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -interpret crash.swift -target x86_64-apple-darwin14.1.0 -target-cpu core2 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -color-diagnostics -module-name crash 1. While emitting IR SIL function @top_level_code[1] 80502 segmentation fault swift crash.swift Regression: Describe circumstances where the problem occurs or does not occur, such as software versions and/or hardware configurations. Notes: Provide additional information, such as references to related problems, workarounds and relevant attachments.
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!