unhelpful syntax error when inferred lambda parameters mismatch expected count #18657
Labels
area:reporting
Error reporting including formatting, implicit suggestions, etc
better-errors
Issues concerned with improving confusing/unhelpful diagnostic messages
itype:enhancement
Compiler version
3.3.1
Minimized example
Output Error/Warning message
Why this Error/Warning was not helpful
The error message is correct, but I must work hard to realise that actually the first argument to
Integer.compare
is expanded to a separate nested lambda, so the placeholder is not forf
.Suggested improvement
The error could be improved by an explanation. Under -explain I would like to see:
This would make it clear which parameter each placeholder refers to.
The text was updated successfully, but these errors were encountered: