         objc_sync_exit(privates.lock)
     }
     
-    func complete(#result: TResult?, error: Any?) {
+    func complete(#result: Any?, error: Any?) {
         locked {
             if !self.privates.completed {
                 self.privates.completed = true


import Foundation

class HNTask<TResult> {

    struct Privates {
        let lock = NSObject()
        var completed: Bool = false
        var result: TResult?
        var error: Any?
        var following: (() -> Void)[] = []
        

    
}

class HNTaskContext {
    let result: Any?
    var error: Any?
    
    init(result: Any?) {
        self.result = result
    }
}
