dart fix
for avoid_redundant_argument_values
makes semantic changes when involving kIsWeb
#47404
Labels
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
dart fix
foravoid_redundant_argument_values
makes semantic changes when involvingkIsWeb
.STEPS TO REPRODUCE
dart create dart_fix_test
dart_fix_test/bin/dart_fix_test.dart
file as follows:dart fix --apply
EXPECTED RESULTS
The analyzer and
dart fix
should magically know thatidentical(0, 0.0)
is not a constant value despite it being a constant according to the language, and thus make no change to the code above.ACTUAL RESULTS
The argument is removed, because kIsWeb is assumed to be true (which is weird in itself, but that's another story) and so the argument is removed. This is, of course, a significant semantic change.
The text was updated successfully, but these errors were encountered: