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

Can't synthesize Decodable implementation for NSObject subclass

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Compiler
    • Labels:
    • Environment:

      Swift 4.0.2

      Description

      import Foundation
      
      public final class Object: NSObject, Swift.Decodable {
          public let property: String
      }
      

      gives this error:

      test.swift:3:54: error: property 'self.property' not initialized at implicitly generated super.init call
      public final class Object: NSObject, Swift.Decodable {
                                                           ^
      

        Attachments

          Activity

            People

            • Assignee:
              itaiferber Itai Ferber
              Reporter:
              mdiep Matt Diephouse
            • Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated: