Analyzer: Wrong error message about async
return type
#41670
Labels
improve-diagnostics
Related to the quality of diagnostic messages
legacy-area-analyzer
Use area-devexp instead.
Consider the following library:
dartanalyzer --enable-experiment=non-nullable
from commit d5310cb (of today) responds with the following error message:This error message indicates that the return type of
f
isbool
, but it is actually declared asFuture<bool>
, so that error message needs to be adjusted. The same behavior exists also without--enable-experiment=non-nullable
.Discussions about
async
returns are ongoing, cf. dart-lang/language#941. However, I do not think that the outcome of that PR will invalidate a fix for this issue.The text was updated successfully, but these errors were encountered: