Analyzer error message on a parse error is incomprehensible. #13227
Labels
analyzer-recovery
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-enhancement
A request for a change that isn't a bug
For the code
main() {
while (1 < 2 < 3) {}
}
the analyzer generates the following warnings:
[error] Expected to find ')' (/usr/local/google/home/lrn/dart/full/dart/dev/d2jspars.dart, line 2, col 15)
[error] Expected to find ';' (/usr/local/google/home/lrn/dart/full/dart/dev/d2jspars.dart, line 2, col 15)
[error] Expected a type name (/usr/local/google/home/lrn/dart/full/dart/dev/d2jspars.dart, line 2, col 17)
[error] Expected to find '>' (/usr/local/google/home/lrn/dart/full/dart/dev/d2jspars.dart, line 2, col 17)
[error] Expected a list or map literal (/usr/local/google/home/lrn/dart/full/dart/dev/d2jspars.dart, line 2, col 17)
[error] Expected to find ';' (/usr/local/google/home/lrn/dart/full/dart/dev/d2jspars.dart, line 2, col 17)
[error] Expected to find ';' (/usr/local/google/home/lrn/dart/full/dart/dev/d2jspars.dart, line 2, col 17)
[error] Expected an identifier (/usr/local/google/home/lrn/dart/full/dart/dev/d2jspars.dart, line 2, col 18)
[error] Unexpected token ')' (/usr/local/google/home/lrn/dart/full/dart/dev/d2jspars.dart, line 2, col 18)
[warning] The name '' is not a type and cannot be used as a parameterized type (/usr/local/google/home/lrn/dart/full/dart/dev/d2jspars.dart, line 2, col 17)
[warning] Undefined name '' (/usr/local/google/home/lrn/dart/full/dart/dev/d2jspars.dart, line 2, col 18)
9 errors and 2 warnings found.
It's very hard to figure out what the error is. If possible, make the error message more useful.
The text was updated successfully, but these errors were encountered: