Swift enum with one case causes crash at runtime
| Originator: | Josh.Lieberman92 | ||
| Number: | rdar://25314388 | Date Originated: | 23-Mar-2016 |
| Status: | Closed | Resolved: | 19-Jul-2016 |
| Product: | OS X SDK | Product Version: | 10.11 |
| Classification: | Crash | Reproducible: | Always |
Summary: Initializing a class from an enum with one case causes a crash. Steps to Reproduce: 1. Download sample project 2. Run sample project 3. Observe crash Expected Results: I would expect the application not to crash the the object to be initialized properly. Adding a second case to the enum does not cause a crash. Actual Results: The application will crash EXC_BAD_ACCESS Version: Xcode 7.3 Apple Swift version 2.2 (swiftlang-703.0.18.1 clang-703.0.29) Target: x86_64-apple-macosx10.9 Notes: Configuration: Occurs every time: OS X El Capitan 10.11.4 (15E65) MacBook Pro (Retina, 15-inch, Early 2013) 2.7 GHz Intel Core i7 16 GB 1600 MHz DDR3 Intel HD Graphics 4000 1536 MB Sample project: https://github.com/JALsnipe/SwiftOneCaseEnumCrash
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!
Apple Developer Relations19-Jul-2016 04:16 PM
Engineering has provided the following information regarding this issue:
We believe this issue has been resolved in Xcode in 7.3. I you continue to have an issue, please let us know.