Uploaded image for project: 'Swift'
  1. Swift
  2. SR-7395

CaseEnumerable and Codable cause crash

    XMLWordPrintable

    Details

      Description

          struct MyOptions : Codable {
              var debug: Bool = false
      
              enum CodingKeys : String, CodingKey, CaseEnumerable {
                  case debug = "d"
              }
          }
      

      The above code causes a crash in serialization, with an ErrorType appearing somewhere in the CodingKeys enum. This may indicate an error that wasn't diagnosed, or it may indicate a type not being computed property.

      (You can get this to happen with swiftc -g.)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jrose Jordan Rose
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: