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
Compiler enforces you to use snake_case in struct field names.
But when you make one with type you can use capitals.
Reproduction Steps
struct Struct1 {
field_One int _// no, you can't_
field_two int
}
// error: field name `fieldOne` cannot contain uppercase letters, use snake_case instead
type Struct2 = struct {
field_One int // yes, you can
field_two int
}
Expected Behavior
For Struct2 // error: field name fieldOne cannot contain uppercase letters, use snake_case instead
Current Behavior
You get
Struct2(struct {
field_One: 1
field_two: 0
})
Possible Solution
No response
Additional Information/Context
No response
V version
Current V version: V 0.4.10 188d68d, timestamp: 2025-04-20 03:25:56 +0300
Environment details (OS name and version, etc.)
Windows 10 Home 22H2 19045.5737
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.
Describe the bug
Compiler enforces you to use snake_case in struct field names.
But when you make one with
typeyou can use capitals.Reproduction Steps
Expected Behavior
For Struct2 //
error: field namefieldOnecannot contain uppercase letters, use snake_case insteadCurrent Behavior
You get
Possible Solution
No response
Additional Information/Context
No response
V version
Current V version: V 0.4.10 188d68d, timestamp: 2025-04-20 03:25:56 +0300
Environment details (OS name and version, etc.)
Windows 10 Home 22H2 19045.5737
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.