title: Swift - Cannot explicitly specialize a generic function
body: <p>I am running into a compiler issue. It happens when I use SwiftTask, and Async, here is a sample:</p>
  
  <p>//-- Generic Method</p>
  
  <pre><code>import Async
  import SwiftTask
  
  class AsyncTask {
      func background&lt;T&gt;(job: (((Float -&gt; Void), (T -&gt; Void), (NSError -&gt; Void), SwiftTask.TaskConfiguration) -&gt; Void)) -&gt; SwiftTask.Task&lt;Float, T, NSError&gt; {
          return SwiftTask.Task&lt;Float, T, NSError&gt; { (progress: (Float -&gt; Void), fulfill: (T -&gt; Void), reject: (NSError -&gt; Void), configure: SwiftTask.TaskConfiguration) -&gt; Void in
              Async.background {
                  job(progress, fulfill, reject, configure)
                  return
              }
  
              return
          }
      }
  }
  </code></pre>
  
  <p>Now that compiles, but when I try to use the generic like so:</p>
  
  <p>//-- Using the Generic Method</p>
  
  <pre><code>let task = AsyncTask.background&lt;MyAwesomeObject&gt; { progress, fulfill, reject, configure in
      let obj = MyAwesomeObject()
      //-- ... do work here
      fulfill(obj)
      return
  }
  </code></pre>
  
  <p>I then get the following error <strong>Cannot explicitly specialize a generic function</strong></p>