From 4f37202b72bf463feaa92b4f0e73bbdf16869dcd Mon Sep 17 00:00:00 2001 From: spaceface777 Date: Sat, 1 Aug 2020 23:01:40 +0200 Subject: [PATCH] checker: allow struct fields starting with capitals in builtin (#5998) --- vlib/v/checker/checker.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index f07622c504..0b461382fb 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -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 {