Hi,

If I have an escaping function that I store and then call, I need to
declare the calling function as throwing, not rethrowing. EG:

    struct FStore {
        let f: () throws -> Void
        init(f: @escaping () throws -> Void) { self.f = f }
        func call() throws { try f() } // Can't put rethrows here - have to
use throws
    }
Is there a better solution?

Thanks for any suggestions,

  -- Howard.
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to