hxasync
hxasync copied to clipboard
Async functions can't return Void type
trafficstars
My code:
@async private function myAsyncFuncReturningVoid(): Void {
// do something
// line 244 is here
}
@async private function test() {
@await this.myAsyncFuncReturningVoid(); // line 264 is here
}
Compiler output:
ex.hx:244: characters 5-38 : Dynamic should be Void
ex.hx:244: characters 5-38 : Dynamic should be Void
ex.hx:264: characters 14-33 : Void should be hxasync.Awaitable<Void>
ex.hx:264: characters 14-33 : ... For function argument 'arg'
This is a known limitation of Haxe, which I did not find a way to workaround.
I will not close the issue, but you should not expect a fix anytime soon :)