title: Swift/iOS SDK: Generic Function with Class Type/Name Closure/Block Issue
body: <p>I'm trying to write a generic class, that takes a custom class name and creates an instance of that class name. 
  Before and after creation I do some generic stuff that applies to all classes. 
  I want to add some parameters to the instance that are class specific. That's why I added a closure that gets called after the instance was created with the instance object itself as a parameter of the closure. The closure is optional.
  Interestingly calling the function without the closure works just fine, if I add the closure I get the following compiler error:</p>
  
  <blockquote>
    <p>Expected member name or constructor call after type name</p>
  </blockquote>
  
  <p>This compiler error applies for the first parameter, which makes no sense, since calling the function just with the first parameter works fine...</p>
  
  <p>I have added my simple example for Playground use:</p>
  
  <pre><code>class Base {
      var test1: Int = 0
  }
  
  class A: Base {
      var test2: Int = 0
  }
  
  class B: Base {
      var test3: Int = 0
  }
  
  func create&lt;T: Base&gt;(aClass: T.Type, addParameter:((T) -&gt; Void)? = nil) {
      println("Do generic stuff before object is created")
  
      var object = aClass()
  
      // Add custom class specific parameters to object
      if let l_addParameter = addParameter {
          l_addParameter(object)
      }
  
      println("Do generic stuff after object was created")
  }
  
  create(A)
  create(B)
  create(B, addParameter: { (b: B) -&gt; Void in
      b.test3 = 1000
  })
  </code></pre>
  
  <p>Any help would be much appreciated! Thanks!</p>