[analyzer] ignore 'dead_code' for this line
action misplaces the ignore: dead_code
comment.
#54565
Labels
analyzer-quick-fix
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)
Consider:
Notice that, as expected, the second argument to the
MapEntry
constructor invocation is being reported as dead code.To reproduce:
2
.// ignore: dead_code
line will be placed in a position that does not have the intended effect. It will be placed betweenvoid main() {
andMapEntry(
and not betweenthrow 0,
and2,
.I expected the
ignore 'dead_code' for this line
action to place the comment in a position that causes the dead code warning to be disabled, that is:The text was updated successfully, but these errors were encountered: