Swift Compiler Crashes on Initializer in Struct Extension
| Originator: | grant.butler | ||
| Number: | rdar://23077487 | Date Originated: | 12-Oct-2015 |
| Status: | Duplicate | Resolved: | |
| Product: | Developer Tools | Product Version: | 7.0 (7A218) |
| Classification: | Crash | Reproducible: | Always |
Marked as Duplicate of rdar://21473547 (which is open at the time of updating this comment on 2017-02-13). Summary: If you have a struct defined in one file, with an field that has a default value, adding a initializer in an extension on that struct in a separate file will cause the Swift compiler to seg fault on the initializer. Steps to Reproduce: 1. Open the attached Xcode project. 2. Build. Expected Results: The file 'Square+Parsing.swift' compiles. Actual Results: The Swift compiler seg faults. Version: Xcode Version 7.0 (7A218) Mac OS 10.10.5 (14F27) Notes: Configuration: MacBook Pro (Retina, 13-inch, Late 2013) 2.4 GHz Intel Core i5 16 GB 1600 MHz DDR3 Intel Iris 1536 MB Attachments: 'SwiftSegFault.zip' was successfully uploaded. Github Repo: https://github.com/grantjbutler/swift-seg-fault-struct-initializer-extension Grant Butler13-Oct-2015 11:52 AM This problem also exists in Xcode Version 7.1 beta (7B75). Additionally, I've attached a stack trace of the crash.
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!