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
Better error message for "return" in a lambda #4070
Comments
Added New label. |
Added Type-Enhancement, Priority-Medium, Area-Analyzer, Triaged labels. |
Added this to the Later milestone. |
Removed this from the M3 milestone. |
This comment was originally written by amouravski@google.com Added Editor-AnalysisEngine label. |
Analysis engine doesn't do very well at this yet either. Set owner to @bwilkerson. |
Added Analyzer-Recovery label. |
Removed this from the Later milestone. |
Removed Oldschool-Milestone-Later label. |
Added Started label. |
https://codereview.chromium.org/781133002/ (bleeding edge revision 42143) Added Fixed label. |
I was doing a quick example, changed something from being a regular function to being a simple lambda, and forgot to take out the return statement. So I get a method that looks like
toString() => return _foo.toString();
and the error message in the editor could be more informative. I get six problems.
A non-abstract method must have a body
Duplicate member 'toString'
Duplicate member 'toString'
Unexpected token '.'
Unexpected token 'IDENTIFIER' (expected ';')
Unexpected token 'return'
The last one is the most useful, but I'd think this is an easy beginner mistake, and we could do better identifying it.
The text was updated successfully, but these errors were encountered: