No quick fix for unused_local_variable when local variable defined in a pattern #52150
Labels
analyzer-language-patterns
Issues with analyzer's support for the patterns language feature
analyzer-quick-fix
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
The following Dart 3.0 code has an
unused_local_variable
diagnostic for the unused variablek
:It would be nice to have a quick fix that removes the redundant
&& var k
, leaving:Similarly, in this code:
It would be nice to have a quick fix that removes the redundant
, :value
, leaving:And in this code:
It would be nice to have a quick fix that replaces the unused local variable
s
with a wildcard pattern, leaving:The text was updated successfully, but these errors were encountered: