Correct, it is not ternary, just a slip of my mind :)

> let age = try dictionary["age"].flatMap { elem in
>     try elem as? Int ?? { throw Error() }()
> }

I didn’t know this workaround worked. Cool! Can somebody from the core team 
tell us if it not supporting throw directly is a bug or an intended feature?
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to