You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
swift-ci opened this issue
Mar 14, 2019
· 8 comments
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
if I add an associated value to enum case, Xcode throws me an error: An internal error has occurred. Source editor functionality is limited. Attempting to restore... and building the project shows me segmentation fault: 11.
I know enums with raw values cannot have associated values but instead of crashing Xcode compiler should throw me an error right?
I have attached the source code when this is happening and screenshot of error it is throwing.
Please let me know if you need anything else.
P.S.: This is my first bug report on Swift and I am pretty noob in Swift programming. Please forgive me if it's really not a bug in swift but an error from my side.
The text was updated successfully, but these errors were encountered:
Thanks! I can reproduce this on 5.1. What's causing this to happen is the initialiser in the extension on the enum, which is called when initialising the static property. This causes the compiler to (try) synthesise raw representable conformance even though we can't do that with enum cases that have a payload. Here's a reduced test case:
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
Attachment: Download
Environment
I am using Xcode Version 10.1 (10B61) and Swift 4.2 with macOS Mojave 10.14.3.
Additional Detail from JIRA
md5: 8ae1dbd92a842e87321189c5c0feb7de
Issue Description:
if I add an associated value to enum case, Xcode throws me an error: An internal error has occurred. Source editor functionality is limited. Attempting to restore... and building the project shows me segmentation fault: 11.
I know enums with raw values cannot have associated values but instead of crashing Xcode compiler should throw me an error right?
I have attached the source code when this is happening and screenshot of error it is throwing.
Please let me know if you need anything else.
P.S.: This is my first bug report on Swift and I am pretty noob in Swift programming. Please forgive me if it's really not a bug in swift but an error from my side.
The text was updated successfully, but these errors were encountered: