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

Report specific ErrorCode when "var" is used instead of "dynamic" #10356

Closed
scheglov opened this issue May 1, 2013 · 8 comments
Closed

Report specific ErrorCode when "var" is used instead of "dynamic" #10356

scheglov opened this issue May 1, 2013 · 8 comments
Labels
analyzer-recovery area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. closed-obsolete Closed as the reported issue is no longer relevant P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@scheglov
Copy link
Contributor

scheglov commented May 1, 2013

https://code.google.com/p/dart/issues/detail?id=10355
So, Quick Fix could use this information and suggest fix.

For example for: Map<String, var>

@scheglov
Copy link
Contributor Author

scheglov commented May 1, 2013

Marked this as blocking #10355.

@bwilkerson
Copy link
Member

I believe that this has been addressed by https://codereview.chromium.org/14811004/. Please let me know if that doesn't meet your needs.


Added Fixed label.

@scheglov
Copy link
Contributor Author

scheglov commented May 2, 2013

Unfortunately, it does not solve problem with using "var" as type argument.


Attachments:
[Screen Shot 2013-05-02 at 11.38.01 AM.png](https://storage.googleapis.com/google-code-attachments/dart/issue-10356/comment-3/Screen Shot 2013-05-02 at 11.38.01 AM.png) (34.50 KB)
[Screen Shot 2013-05-02 at 11.39.21 AM.png](https://storage.googleapis.com/google-code-attachments/dart/issue-10356/comment-3/Screen Shot 2013-05-02 at 11.39.21 AM.png) (41.67 KB)


Added Triaged label.

@bwilkerson
Copy link
Member

While it's true that 'var' cannot be used as a type, we should do a better job of reporting and recovering from such an error.


Added Analyzer-Recovery label.

@bwilkerson
Copy link
Member

Removed Type-Defect label.
Added Type-Enhancement label.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@scheglov scheglov added Priority-Medium area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-recovery labels Aug 4, 2014
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed triaged labels Feb 29, 2016
@srawlins
Copy link
Member

We seem to recover much much better today. This now gets reported as:

error: The keyword 'var' cannot be used as a type name
warning: The name 'var' is not a type and cannot be used as a parameterized type

Done?

@bwilkerson bwilkerson removed their assignment Aug 15, 2016
@matanlurey matanlurey added the closed-obsolete Closed as the reported issue is no longer relevant label Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-recovery area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. closed-obsolete Closed as the reported issue is no longer relevant P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

6 participants