Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async functions can't return Void type #26

Open
fed239 opened this issue Feb 3, 2023 · 1 comment
Open

Async functions can't return Void type #26

fed239 opened this issue Feb 3, 2023 · 1 comment

Comments

@fed239
Copy link

fed239 commented Feb 3, 2023

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'
@botsman
Copy link
Owner

botsman commented Feb 3, 2023

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants