comment_references
should allow references to elements of a returned record
#59526
Labels
devexp-linter
Issues with the analyzer's support for the linter package
legacy-area-analyzer
Use area-devexp instead.
needs-info
We need additional information from the issue author (auto-closed after 14 days if no response)
P3
A lower priority bug or feature request
type-enhancement
A request for a change that isn't a bug
Historically, it's been common to document the parameters of a method by using square brackets to refer to the parameter names. For example, the doc comment for
List.operator ==
(in the SDK) uses square brackets to refer to the parameterother
:Note that Dartdoc doesn't generate a link for
other
(see https://api.dart.dev/stable/3.5.1/dart-core/List/operator_equals.html), so the only relevant functionality here is that thecomment_references
lint allows the name to beother
.I think that if the return type of the method being documented is a record, it should be permissible to use square brackets to refer to members of the record. For example:
Similar for unnamed record elements, using the usual
$N
syntax. For example:The text was updated successfully, but these errors were encountered: