Skip to content

Async functions can't return Void type #26

@fed239

Description

@fed239

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions