Description
Consider this case:
do
let a = b.ToString()

The are two errors:
- syntax error: missing
in
part of thelet
expression - unresolved
b
name
The second error is not reported. This has been like that for long time where we tried to minimize cascading type checker errors, so some of them are hidden when there are errors in preceding phases. However, with the significantly improved parser recovery it should be much better to report these errors now. Having any in
expression helps in this case:
do
let a = b.ToString()
()

But we want a better error reporting while editing too 🙂
The same applies to other case where the parser recovery has been introduced, for example tuple expressions. When there are no syntax errors, type checker errors about the unresolved name and a missing overload are reported:
Math.Max(a)

When typing the second argument (and adding a syntax error in the tuple), the resolved names are reported, but the type checker errors are hidden (even though the parser recovery now allows the subsequent analysis):
Math.Max(a, )

When the syntax error is fixed, everything is reported, even a warning about the unused expression result:
Math.Max(a, 1)

Typing subsequent arguments makes errors blink, which is not great:

Metadata
Metadata
Assignees
Labels
Type
Projects
Status