[analyzer] Report a compile-time error for external initializing formals #54485
Labels
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
dart-model-analyzer-spec
Issues with the analyzer's implementation of the language spec
implementation
Track the implementation of a specific feature (use on area-meta issue, not issues for each tool)
P3
A lower priority bug or feature request
Consider the following program:
The CFE reports a compile-time error on this library. The analyzer accepts it with no errors.
It was previously only mentioned in commentary that it is a compile-time error for an external generative constructor to have an initializing formal parameter, but in dart-lang/language#3517 the specification was clarified such that it is now clearly specified to be a compile-time error.
This issue is the implementation issue for that implementation effort. It is 'area-analyzer' rather than 'area-meta', with sub-issues, because there is nothing to implement in any other tool than the analyzer.
It is not a breaking change, because every external constructor declaration that has an initializing formal is reported as a compile-time error by the CFE already today.
The text was updated successfully, but these errors were encountered: