-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
devexp-serverIssues related to some aspect of the analysis serverIssues related to some aspect of the analysis serverlegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
The recommended way to document a getter/setter-pair property is to put DartDoc on the getter only. The DartDoc tool then documents similarly to a field.
The analysis server does not provide the getter DartDoc when hovering over a setter. This can be seen in, e.g., VSCode.
Take code like:
main() {
var c = C();
c.foo = null; // Shows setter-docs when hovering foo.
c.bar = null; // No docs when hovering bar.
}
class C {
/// Getter docs.
int get foo => 42;
/// Setter docs.
void set foo(int x) {}
/// Getter docs;
int get bar => 42;
void set bar(int x) {}
}It should definitely show the getter docs for bar.
Whether to show the getter or setter docs for foo is a design decision. The DartDoc tool ignores the setter docs.
Metadata
Metadata
Assignees
Labels
devexp-serverIssues related to some aspect of the analysis serverIssues related to some aspect of the analysis serverlegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)