Closed
Description
The autofix for use_super_params is correcting the following code...
class Base {
Base(this.value);
final int value;
}
class Extended extends Base {
Extended(final int value) : super(value);
}
... to ...
class Base {
Base(this.value);
final int value;
}
class Extended extends Base {
Extended(final super.value); // note the incorrect final here
}
When running this code, I get the following error:
Error: Can't have modifier 'final' here.
Try removing 'final'.
Extended(final super.value);
^^^^^
The autofix should have removed the "final" here.
(And I also would have expected the analyzer to complain about the incorrectly left behind "final" - instead of just getting an error when executing the program. Filed #48699 for that.)