poor examples in "pattern expected" explanation with val def, (also do
as name causes the problem)
#18750
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.0
Minimized example
Output Error/Warning message
Why this Error/Warning was not helpful
three things:
val
def, and none of the examples show how to do that, instead only in a match case.do
is a keyword, so this might cause confusion when they expected to define an ordinary value.Suggested improvements
do
is a keyword, so can't be used as a nameThe text was updated successfully, but these errors were encountered: