You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following invalid code gives poor error reports:
fnmain() {
dummy:=map[string][bool] // invalid syntax should be map[string]bool{}fori:=0; i <10; i++ {
}
}
Reproduction Steps
[I] root@trump ~ [1]
# v fmt -w e.v
e.v:2:24: error: maps can only have a single key
1|fnmain() {
2|dummy:=map[string][bool]
|~~~~3|fori:=0; i <10; i++ {
4| }
Internal vfmt error while formatting file: e.v.
Encountered a total of: 1 errors.
[I] root@trump ~ [1]
# v e.v
e.v:3:15: error: expression evaluated but not used
1|fnmain() {
2|dummy:=map[string][bool]
3|fori:=0; i <10; i++ {
|~~~~~~4| }
5| }
Expected Behavior
I would like to see "syntax error" or something more non-spurious.
The compiler should not point out the for-loop below for sure.
Describe the bug
The following invalid code gives poor error reports:
Reproduction Steps
Expected Behavior
I would like to see "syntax error" or something more non-spurious.
The compiler should not point out the for-loop below for sure.
Current Behavior
See above.
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.4 cf7dcfe
Environment details (OS name and version, etc.)
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: