         
     }
 
-    var result: TResult? {
+    var result: Any? {
         get {
-            var value: TResult?
+            var value: Any?
             locked {
                 value = self.privates.result
             }


import Foundation

class HNTask<TResult> {

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

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