Skip to content

Add Add await fix for for_in_of_invalid_type when Future<Iterable>/Stream #60648

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

Open
FMorschel opened this issue Apr 30, 2025 · 1 comment
Open
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. devexp-quick-fix Issues with analysis server (quick) fixes P3 A lower priority bug or feature request

Comments

@FMorschel
Copy link
Contributor

FMorschel commented Apr 30, 2025

Consider:

Future<void> foo(Future<List<int>> future) async {
  final controller = StreamController<int>();
  for (final i in controller.stream) {}
  for (final l in future) {}
}

For both cases, we could have the Add await fix. The first case only needs to insert it before for.

@FMorschel FMorschel added the area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. label Apr 30, 2025
@FMorschel
Copy link
Contributor Author

@bwilkerson bwilkerson added P3 A lower priority bug or feature request devexp-quick-fix Issues with analysis server (quick) fixes labels May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. devexp-quick-fix Issues with analysis server (quick) fixes P3 A lower priority bug or feature request
Projects
None yet
Development

No branches or pull requests

2 participants