Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler error instead of static warning if a class declares a static setter named v = and also has a non-static member named v. #12351

Closed
iposva-google opened this issue Aug 9, 2013 · 3 comments
Assignees
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
Milestone

Comments

@iposva-google
Copy link
Contributor

This is the analyzer bug of issue #12342:

Dart spec v0.51 7.3 Setters reads:

 It is a static warning if a class declares a static setter named v = and also has a non-static member named v.

However, dartVM, dart2js and dartanalyzer all report an error in such a case.

See new co 19 tests Language/07_Classes/3_Setters_A08_*. from r545.

@bwilkerson
Copy link
Member

Added this to the M6 milestone.
Removed Priority-Unassigned label.
Added Priority-Medium label.

@jwren
Copy link
Member

jwren commented Aug 9, 2013

Set owner to @jwren.
Added Started label.

@jwren
Copy link
Member

jwren commented Aug 9, 2013

This matches up with StaticWarningCode.CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER, which was implemented at the end of May (2013-05-31).

This code generates a warning:

class A {
  get x => 0;
  static set x(int p) {}
}


Added Fixed label.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
Projects
None yet
Development

No branches or pull requests

3 participants