title: init(from decoder: Decoder) is causing a "Cannot infer contextual base" error in separate convenience init
body: <p>I'm trying to subclass a <code>Codable</code> class and it's working fine until I add a <code>init(from decoder: Decoder)</code> function. Then, the compiler is giving me 2 errors on my convenience init:</p>
  <p><code>Cannot infer contextual base in reference to member 'geometry'</code></p>
  <p><code>Extra arguments at positions #2, #3, #4, #5 in call</code></p>
  <p>If I remove the decode function, I get no errors and the encode function works as expected. How can I have both a convenience init and a decoder function? Is there some unwritten rule prohibiting this?</p>
  <pre><code>class GeometryNode: Node {
      var values = GeometryNode.Values(shape: .triangle)
      
      enum CodingKeys: String, CodingKey {
          case values
          
          case id
          case type
          case indexPath
      }
      
      // NOTE: GeometryNode.Values is a codable struct
      // NOTE: GeometryNode.Values.Shape a codable enum
      // NOTE: both are defined elsewhere
      convenience init(id: String? = nil, shape: GeometryNode.Values.Shape = GeometryNode.Values.Shape.triangle, indexPath: IndexPath) {
          let icon = shape.icon
          let color = shape.color
          let title = shape.rawValue
  
          // Error shows for below call
          self.init(id: id, title: title, type: .geometry, icon: icon, color: color, indexPath: indexPath)
      }
      
      override func encode(to encoder: Encoder) throws {
          try super.encode(to: encoder)
          var container = encoder.container(keyedBy: CodingKeys.self)
          try container.encode(self.values, forKey: .values)
      }
      
      // Remove this function and error above goes away
      required init(from decoder: Decoder) throws {
          try super.init(from: decoder)
          let container = try decoder.container(keyedBy: CodingKeys.self)
          values = try container.decode(GeometryNode.Values.self, forKey: .values)
      }
      
  }
  </code></pre>
  <pre><code>extension GeometryNode {
      struct Values: Codable {
          
          var shape: Shape
          
          enum Shape: String, CaseIterable, Codable {
              case triangle
              case rectangle
              case oval
              
              var defaultColor: UIColor {
                  return NodeType.geometry.defaultColor
              }
              
              var fontSize: CGFloat {
                  return 24
              }
              
              var icon: UIImage {
                  return miscValues.icon
              }
  
              var color: UIColor {
                  return miscValues.color
              }
  
              private var miscValues: (icon: UIImage, color: UIColor) {
                  switch self {
                      case .triangle: return (&quot;&quot;.textToImage(fontSize: fontSize)!, color: defaultColor)
                      case .rectangle: return (&quot;◾️&quot;.textToImage(fontSize: fontSize)!, color: defaultColor)
                      case .oval: return (&quot;⚫️&quot;.textToImage(fontSize: fontSize)!, color: defaultColor)
                  }
              }
          }
          
          enum CodingKeys: String, CodingKey {
              case shape
          }
      }
  }
  </code></pre>
  <pre><code>public class Node: Codable {
      
      
      var id: String?
      var title: String?
      var type: NodeType = .geometry
      var icon: UIImage?
      var color: UIColor?
      var indexPath: IndexPath
      
      var defaultColorForType: UIColor {
          return type.defaultColor
      }
      var absoluteCoordinates: CGPoint? {
          return CGPoint(x: indexPath.item * kCellWidth, y: indexPath.section * kCellHeight)
      }
      func dictionary() -&gt; [String: Any] {
          let data = (try? JSONEncoder().encode(self)) ?? Data()
          return (try? JSONSerialization.jsonObject(with: data, options: .mutableContainers) as? [String: Any]) ?? [:]
      }
      
      enum CodingKeys: String, CodingKey {
          case id
          case type
          case indexPath
      }
      
      internal init(id: String? = nil, title: String, type: NodeType = .geometry, icon: UIImage? = nil, color: UIColor? = nil, indexPath: IndexPath) {
          self.id = id
          self.title = title
          self.type = type
          self.icon = icon
          self.color = color
          self.indexPath = indexPath
      }
  }
  
  extension IndexPath {
      enum CodingKeys: String, CodingKey {
          case item
          case section
      }
  }
  </code></pre>