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

Analyzer warning not very helpful when missing async on a method #24264

Closed
mit-mit opened this issue Sep 1, 2015 · 2 comments
Closed

Analyzer warning not very helpful when missing async on a method #24264

mit-mit opened this issue Sep 1, 2015 · 2 comments
Labels
analyzer-recovery area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@mit-mit
Copy link
Member

mit-mit commented Sep 1, 2015

The following code

foo() async => 42;
main() {
  print(await foo());
}

is missing the async keyword on the main method. However, the Analyzer warning is not very helpful, it just says Undefined name 'await'

It would be great if we could be more specific and point the user towards the easy resolution to this.

@mit-mit mit-mit added Type-Enhancement area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. labels Sep 1, 2015
@mit-mit mit-mit changed the title Analyzer warning not very helpful when missing async on a Analyzer warning not very helpful when missing async on a method Sep 1, 2015
@bwilkerson bwilkerson self-assigned this Sep 1, 2015
@srawlins
Copy link
Member

Should this be wrapped into #24375?

@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed Priority-Medium labels Mar 1, 2016
@bwilkerson bwilkerson removed their assignment Aug 15, 2016
@bwilkerson
Copy link
Member

The error message has been improved and a quick fix added, so I'm going to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-recovery area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants