title: 'self' used before all stored properties are initialized in struct
body: <p>I want <code>CurrendData.location</code> to get its random value once <code>CurrentData</code> gets initialized. I came up following code:</p>
  <pre><code>struct CurrentData {
      var size: (x: Int, y: Int)
      var location: (x: Int, y: Int)
          
      init(size: (x: Int, y: Int)) {
          self.size = size
          self.location = (getRandom(size.x), getRandom(size.y)) //error
      }
      
      private func getRandom (_ value:Int) -&gt; Int {
          return Int.random(in: 0...value-1)
      }
  }
  </code></pre>
  <p>But I get this error: &quot;'self' used before all stored properties are initialized&quot;. How can it be fixed?</p>