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

Misleading errormessage when using a setter with () #395

Closed
DartBot opened this issue Nov 9, 2011 · 4 comments
Closed

Misleading errormessage when using a setter with () #395

DartBot opened this issue Nov 9, 2011 · 4 comments

Comments

@DartBot
Copy link

DartBot commented Nov 9, 2011

This issue was originally filed by grobmei...@gmail.com


What steps will reproduce the problem?

  1. open editor
  2. write this code:

 Element e = doc.querySelector('#test');
 e.textContent('irgendwas');

  1. read warning/error in Problems tab: "textContent" is not a method in Element

Clearly the way the setter is used is wrong. But for compliance, why can't it be used as any other method?
If () are not acceptable for setters for whatever reason, the message should not be "is not a method". It should be "is a setter and must not be called like a method" or something like that.

@DartBot
Copy link
Author

DartBot commented Nov 9, 2011

This comment was originally written by drfibonacci@google.com


Added Area-Editor, Triaged labels.

@bwilkerson
Copy link
Member

Removed Area-Editor label.
Added Area-Compiler label.

@DartBot
Copy link
Author

DartBot commented Nov 22, 2011

This comment was originally written by zundel@google.com


http://codereview.chromium.org/8643001

$ dartc --noincremental /tmp/h.dart
file:/tmp/h.dart/h.dart:6: Use assignment to set field "textContent" in Element
     5: Element e;
     6: e.textContent('irgendwas');


Set owner to zundel@google.com.
Added Started label.

@DartBot
Copy link
Author

DartBot commented Nov 22, 2011

This comment was originally written by zundel@google.com


r1750


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
None yet
Projects
None yet
Development

No branches or pull requests

2 participants