[swift-users] Defer Question

Ezekiel Elin ezekielelin at me.com
Mon Dec 7 12:29:33 CST 2015


Is there any way for me to identify what value is/will be returned by the function in a defer block

here’s some example code

func someFunction() -> Int {
    defer {
        //Can I get the "5" that I'm returning here?
    }
    return 5
}

- Ezekiel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20151207/d73a1b22/attachment.html>


More information about the swift-users mailing list