Ridiculous number of compiler errors for a missing open { on top-level #25652
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
Compare:
https://dartpad.dartlang.org/8f24e1eb9c237c01bcb3
http://www.typescriptlang.org/Playground#src=%0Afunction%20main()%0A%20%20var%20lines%20%3D%20getLines()%3B%0A%0A%20%20%2F%2F%20If%20result%20is%20non-null%2C%20print%20it.%0A%20%20if(lines%20!%3D%3D%20null)%20%7B%0A%09lines.forEach((line)%20%3D%3E%20console.log(line))%3B%0A%20%20%7D%0A%7D%0A%0Afunction%20getLines()%3A%20string%5B%5D%20%7B%0A%09return%20%5B%22%22%5D%0A%7D
Both have the same syntax error, a missing { on the function body.
Dart prints 8 errors, 7 of which are completely useless noise and one is in completely the wrong place (a full 3 lines from where the error actually is).
Typescript prints two - one at the method I messed up on, and one (correctly) at the end brace for that method.
The text was updated successfully, but these errors were encountered: