Given error positioning is ambiguous and should mark the entire expression instead #21537
Labels
area:reporting
Error reporting including formatting, implicit suggestions, etc
better-errors
Issues concerned with improving confusing/unhelpful diagnostic messages
itype:bug
Given error positioning is only marking the end of the relevant expression. This leads to ambiguous reporting in infix expression and the error is not clear if it's the RHS argument error or the entire expression argument error.
Consider the example below. The given error positioning for
x1
andx2
internal expressions are indistinguishable. Contrarily, the error positioning difference betweenx3
andx4
is very clear.Compiler version
v3.5.0
Minimized code
Output
Expectation
When a given error occurs, it needs to mark the entire expression and not just the end of it, like seen in the
x3
andx4
examples.The text was updated successfully, but these errors were encountered: