1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker: allow struct fields starting with capitals in builtin (#5998)

This commit is contained in:
spaceface777 2020-08-01 23:01:40 +02:00 committed by GitHub
parent 1feca22e28
commit 4f37202b72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -305,7 +305,7 @@ pub fn (mut c Checker) struct_decl(decl ast.StructDecl) {
c.check_valid_pascal_case(decl.name, 'struct name', decl.pos)
}
for i, field in decl.fields {
if decl.language == .v {
if !c.is_builtin_mod && decl.language == .v {
c.check_valid_snake_case(field.name, 'field name', field.pos)
}
for j in 0 .. i {