title: Error in Swift class: Property not initialized at super.init call
body: <p>I have two classes, <code>Shape</code> and <code>Square</code></p>
  
  <pre><code>class Shape {
      var numberOfSides = 0
      var name: String
      init(name:String) {
          self.name = name
      }
      func simpleDescription() -&gt; String {
          return "A shape with \(numberOfSides) sides."
      }
  }
  
  class Square: Shape {
      var sideLength: Double
  
      init(sideLength:Double, name:String) {
          super.init(name:name) // Error here
          self.sideLength = sideLength
          numberOfSides = 4
      }
      func area () -&gt; Double {
          return sideLength * sideLength
      }
  }
  </code></pre>
  
  <p>With the implementation above I get the error:</p>
  
  <pre><code>property 'self.sideLength' not initialized at super.init call
      super.init(name:name)
  </code></pre>
  
  <p>Why do I have to set <code>self.sideLength</code> before calling <code>super.init</code>?</p>