So, I know this doesn’t actually address your issue, but I think it is
important to clarify that “rethrows” does not guarantee anything about the
*type* of error thrown by a function. What “rethrows” implies is that the
function *will not throw* unless at least one of its arguments throws.
In part
I need to do something like this:
func withPredicateErrors(_ predicate: (Element) throws
-> Bool, do body: ((Element) -> Bool) -> Return) rethrows -> Return {
var caught: Error?
let value = body { elem in
do {
return try predicate(elem)