Analyzer detection of block-bodied functions in type inference is incomplete. #31963
Labels
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
The analyzer contains a hint,
TOP_LEVEL_FUNCTION_LITERAL_BLOCK
, to let the user know that type inference results may not be reliable due to the appearance of a block-bodied function in a variable's initializer. (The common front end can type infer such variables accurately; the analyzer can't always).Unfortunately, this hint does not always fire correctly. For example, the following code currently should produce the hint, but it doesn't:
I'm working on a fix.
The text was updated successfully, but these errors were encountered: