Unfortunate error recovery for final variable declaration with missing variable names #28191
Labels
analyzer-recovery
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
P2
A bug or feature request we're likely to work on
type-enhancement
A request for a change that isn't a bug
From user feedback. Consider this code:
The user is in the middle of editing or adding the variable name for the last line (or has forgotten to add the variable), but the error messages they see are the following:
This is confusing, and with lots of these variables in scope, the error messages are very noisy in the interim (even if the user correctly identifies the problem).
I wonder if at least in the IDE, errors that arise from using a local variable as a type could be recognized, collapsed, and a hint generated pointing to the place where the "type as local variable" is declared? Perhaps only doing this when the local variable is a type name in the enclosing scope?
cc @Hixie
The text was updated successfully, but these errors were encountered: