Closed andyli closed 5 years ago
import tink.CoreApi; @await class Test { @await static function main() { try { @await Surprise.async(function(resolve){ resolve(Failure("my fail msg")); }); } catch(err:Dynamic) { trace("err: " + err); } } }
It traces err: null, but I expect it to be err: my fail msg. I noticed that it works as expected if I change the main() meta from @await to @async.
err: null
err: my fail msg
main()
@await
@async
It traces
err: null
, but I expect it to beerr: my fail msg
. I noticed that it works as expected if I change themain()
meta from@await
to@async
.