Can mixed_return_types be relaxed for async functions that return Future<void>? #58060
Labels
devexp-linter
Issues with the analyzer's support for the linter package
legacy-area-analyzer
Use area-devexp instead.
Given the following code:
dartanalyzer will complain about the
return;
line:This seems overzealous for an
async
function declared to returnFuture<void>
given that:are legal and since the analyzer doesn't complain about not having a
return
statement when reaching the end of the function.To avoid the analysis error, I need to replace
return;
withreturn Future.value()
, which I think is less clear.The text was updated successfully, but these errors were encountered: