[linter] Super initialization with optional parameter leads to unused_element
#55720
Labels
analyzer-warning
Issues with the analyzer's Warning codes
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
P2
A bug or feature request we're likely to work on
Dart version:
Dart SDK version: 3.5.0-edge.eea3bb5c4fbd09b5f1ba662a5ce19f032b6dba15 (main) (Wed May 8 08:13:44 2024 -0700) on "macos_arm64"
Consider the following Dart code:
The above results in an
unused_element
diagnostic aroundthis.f
, even though_C
uses it to provide a value forf
.If we replace
_C
with:The lint goes away. Should the lint not trigger in the super initialization syntax, or is there some better syntax I should be using?
The text was updated successfully, but these errors were encountered: