Closed
Description
This code doesn't contain any static warnings:
void returnsVoid() {}
main() async {
await returnsVoid();
}
Should it? It seems like code that is awaiting an immediate value is likely to be an error. Code that is awaiting void
is really likely to be an error.
This cropped in internally because someone was doing:
await stuff.forEach((element) => convert it to a future...);
Instead of using forEach()
they should have used map()
.