Subject: | try { return } does not work correctly inside `async sub` (F:AA + S:K:T) |
A `return` statement inside a try/catch block (Syntax::Keyword::Try) fails:
async sub with_trycatch_return
{
try {
await $f1;
return "result";
}
catch {}
}
The future that `with_trycatch_return` is never completed even after $f1 is, so attempting to force it complains that it "is not yet complete and does not provide ->await".
--
Paul Evans