Imprecise error message when parameter type is missing #13393
Labels
bug
Observed behavior contradicts documented or intended behavior
error message
This issue points out an error message that is unhelpful and should be improved.
frontend
Tokenization, parsing, AstGen, Sema, and Liveness.
Milestone
Zig Version
0.10.0-dev.4587+710e2e7f1
Steps to Reproduce and Observed Behavior
When the type is missing:
...then the error message says the parameter name is missing, rather than the parameter type.
Expected Behavior
Sometimes the current error message happens to make sense, i.e. when the programmer puts a type name there.
However, since type annotations require
:
I expected the error to saymissing parameter type
in this example.Rust offers the following elaboration:
The text was updated successfully, but these errors were encountered: