 
   /// Get a pointer to a `DeferredTask` that will resolve this `Deferred`
 
-  private func deferredTask(from state: Int) -> UnsafeMutablePointer<DeferredTask>?
+  private func deferredTask(from state: Int) -> UnsafeMutablePointer<DeferredTask<Success, Failure>>?
   {
     guard state.tag == .waiting else { return nil }
     return state.ptr?.assumingMemoryBound(to: DeferredTask.self)

  var ptr: UnsafeMutableRawPointer? { return UnsafeMutableRawPointer(bitPattern: self & ~.stateMask) }
}

private struct DeferredTask
{
  let task: () -> Void
}

/// An asynchronous computation.

          if let taskp = deferredTask(from: state)
          { // we need to execute the task
            self.queue.async {
              [self] in
              withExtendedLifetime(self) { taskp.pointee.task(Resolver(self)) }
              taskp.deinitialize(count: 1)
              taskp.deallocate()
            }
