No static warning if class has implicitly declared static getter and an explicitly declared instance setter with the same name #24534
Labels
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
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Specification (3rd Edition, June 2015) states (10.2 Getters):
It is a static warning if a class declares a static getter named v and also
has a non-static setter named v =. ... These warnings must be issued regardless of
whether the getters or setters are declared explicitly or implicitly.
Look at the following program:
There are instance setter and implicitly defined static getter. But dartanalyzer produces
[error] The name 'v' is already defined
No static warning reported
The text was updated successfully, but these errors were encountered: