title: Property Initialization error with Function Type
body: <p>I'm in the process of learning Swift and working on applying a callback pattern to a class as practice and running into an issue I cannot get past (Build Error)</p>
  
  <pre><code>override init() {
      super.init()
  }
  
  convenience init(picker: UIPickerView) {
      self.init()
      picker.delegate = self
      picker.dataSource = self
  }
  
  var _selectedCallback:  (String) -&gt; Void        
  
  func onItemSelected(callback: (String) -&gt; Void) {
      self._selectedCallback = callback
  }
  </code></pre>
  
  <p>The above snippet places a compiler error on <code>super.init()</code> with the error message </p>
  
  <blockquote>
    <p>"Property 'self._selectedCallback' not initialized at super.init call"</p>
  </blockquote>
  
  <p>.</p>
  
  <p>Now, I understand that all local variables have to have values assigned to them; however, how would I initialize the function type of _selectedCallback? Examples I've seen has something like the following:</p>
  
  <pre><code>var _selectedCallback:  (String) -&gt; Void = test
  
  func test(message: String { }
  </code></pre>
  
  <p>The above snippet returns a compile error of </p>
  
  <blockquote>
    <p>"'String' is not a subtype of "</p>
  </blockquote>
  
  <p>I feel like I'm missing something simple, I just can't find it.  That or I'm doing it wrong and need to find a better way of doing this.</p>