Skip to content

Issue with lint unnecessary_await_in_return #57934

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

Closed
gabrc opened this issue Apr 12, 2019 · 1 comment · Fixed by dart-archive/linter#1531
Closed

Issue with lint unnecessary_await_in_return #57934

gabrc opened this issue Apr 12, 2019 · 1 comment · Fixed by dart-archive/linter#1531
Labels
devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. linter-false-positive

Comments

@gabrc
Copy link

gabrc commented Apr 12, 2019

In the code below, await is necessary.

import 'dart:async';

Future<num> foo() async => 1;

// The lint unnecessary_await_in_return reports an issue here, but the await is necessary
// as an implicit downcast is necessary.
// We cannot change the code to `Future<int> bar() => foo()`
Future<int> bar() async => await foo();

void main() async => print(await bar());
@pq
Copy link
Member

pq commented Apr 16, 2019

@a14n: thoughts on this one?

@devoncarew devoncarew added devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. labels Nov 18, 2024
@devoncarew devoncarew transferred this issue from dart-archive/linter Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. linter-false-positive
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants