Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Usage of "await" w/o an assignment causes the error in the runtime #1701

Open
@antonmoiseev

Description

@antonmoiseev

If I use await and don't save the result of async operation in a variable, AngularDart throws an error in the runtime.

Example:

@Component(...)
class MyComponent {
  MyService _myService;

  MyComponent(this._myService);

    method() async {
      await _myService.doAsyncOperation();
    }
}

This throws following error: Type 'MyComponent' not found in generated typeFactory maps. Is the type's constructor injectable and annotated for injection?

When I save the result in a variable, the code works fine:

final _ = await _myService.doAsyncOperation();

AngularDart revision: 011d65f00d7a7d5f825b4337cf594baf20e6625f.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions