Analysis Server Crash When Running dart fix --apply (Error in avoid_redundant_argument_values) #60266
Labels
area-dart-model
Use area-dart-model for issues related to packages analyzer, front_end, and kernel.
model-const-eval
Implementation of constant evaluation
Description:
When running dart fix --apply in my project, the Analysis Server crashes with an internal error. The error appears to be triggered by the analyzer when processing the lint rule avoid_redundant_argument_values. It fails while computing constant values for default parameters (for example, FontWeight? fontWeight and double? fontSize), leading to multiple stack traces.
Expected Behavior:
The command dart fix --apply should complete its analysis and apply any fixes without crashing the Analysis Server.
Actual Behavior:
The Analysis Server throws internal errors similar to the following output:
Additional errors regarding double? fontSize are also displayed.
Steps to Reproduce:
Open a project that contains code triggering the avoid_redundant_argument_values lint rule.
Run the command:
dart fix --apply
Observe that the Analysis Server crashes and outputs multiple stack traces related to constant value computation.Dart SDK Version:
Please replace the placeholder below with the output of dart --version from your terminal:
Additional Information:
The error appears related to how the analyzer computes constant values for default parameters during lint processing.
If applicable, please mention if you are using Flutter (and include the Flutter version).
A minimal reproducible example may help; let me know if additional code samples are needed.
The text was updated successfully, but these errors were encountered: