SE-0493: Support `async` calls in `defer` bodies

The only real concern I have with throwing defer is how to handle the case where two or more errors might need to be thrown:

func f() throws {
  defer { throw DeferredError() }
  throw OriginalError()
}

Which is as much a question of documentation as it is anything else. And I don't read this question as blocking async defer.

4 Likes