diff --git a/compiler/parser.v b/compiler/parser.v index 99dbaeeab5..c4c0ea7973 100644 --- a/compiler/parser.v +++ b/compiler/parser.v @@ -422,7 +422,7 @@ fn (p mut Parser) struct_decl() { } } // V used to have 'type Foo struct', many Go users might use this syntax - if p.tok == STRUCT { + if !is_c && p.tok == STRUCT { p.error('use `struct $name {` instead of `type $name struct {`') } // Register the type