Confusing error message in case of missing var/const keyword #12721
Labels
error message
This issue points out an error message that is unhelpful and should be improved.
Milestone
Zig Version
0.10.0-dev.3842+36f4f32fa
Steps to Reproduce
Compile this code
Expected Behavior
Error about missing var or const keyword
Actual Behavior
Obviously, the parser treats z: as a label, so this error is quite understandable, but can be a bit confusing, especially for beginners. May be it would be better to have another syntax for labels? Something like this:
or even
The text was updated successfully, but these errors were encountered: