title: Using Decodable with inheritance raises an exception
body: <p>I'm working against Rest API service, where the responses are divided into Base response, and all other responses inherit from it.</p>
  
  <p>I'm trying to building the same structure for my response model classes, using the Decoder interface.</p>
  
  <p>However i'm having issues with the decoding of an inherited class.</p>
  
  <p>I tried to follow this issue:
  <a href="https://stackoverflow.com/questions/44553934/using-decodable-in-swift-4-with-inheritance">Using Decodable in Swift 4 with Inheritance</a></p>
  
  <p>But with no luck.</p>
  
  <p>This is the initial structure: </p>
  
  <pre><code>class LoginResponse: BaseResponse{
  
      var Message: String?
  
      private enum CodingKeys: String, CodingKey{
          case Message
      }
  
      required init(from decoder: Decoder) throws {
          let container = try decoder.container(keyedBy: CodingKeys.self)
          Message = try container.decode(String.self, forKey: .Message)
          let superDecoder = try container.superDecoder()
          try super.init(from: superDecoder)
      }
  }
  
  class BaseResponse: Decodable {
  
      var Status: Int?
  
      private enum CodingKeys: String, CodingKey{
          case Status
      }
  
      required init(from decoder: Decoder) throws {
          let container = try decoder.container(keyedBy: CodingKeys.self) // This line throws the exception
          Status = try container.decode(Int.self, forKey: .Status)
      }
  }
  </code></pre>
  
  <p>Here's how I'm trying to decode:</p>
  
  <pre><code> let decoder = JSONDecoder()
   let json = "{\"Message\":\"saa\",\"Status\":200}"
   let login = try! decoder.decode(LoginResponse.self, from: json.data(using: .utf8)!)
  </code></pre>
  
  <p>As I wrote above, this line throws the exception (in BaseResponse class)</p>
  
  <pre><code>let container = try decoder.container(keyedBy: CodingKeys.self)
  
  
  Fatal error: 'try!' expression unexpectedly raised an error: Swift.DecodingError.valueNotFound(Swift.KeyedDecodingContainer&lt;SampleProject.BaseResponse.(CodingKeys in _084835F8074C7E8C5E442FE2163A7A00)&gt;, Swift.DecodingError.Context(codingPath: [Foundation.(_JSONKey in _12768CA107A31EF2DCE034FD75B541C9)(stringValue: "super", intValue: nil)], debugDescription: "Cannot get keyed decoding container -- found null value instead.", underlyingError: nil))
  </code></pre>
  
  <p>Not sure how to deal with it.</p>
  
  <p>Thanks in Advance!</p>