unnecessary_statements
and no_self_assignments
discussion
#59578
Labels
analyzer-warning
Issues with the analyzer's Warning codes
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
P3
A lower priority bug or feature request
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
type-enhancement
A request for a change that isn't a bug
If you have a code like the following we should be receiving unnecessary_statements triggers:
The background for this is that while working on #57090 I ended with a code similar to:
In my case the variable in question was even the same name as a propriety for the class
case
I was testing. So by doing likeMyClass(: var i)
I completely shadowed my variable and was left wondering why I got that error bellow.The text was updated successfully, but these errors were encountered: