Skip to content

Commit

Permalink
fix parser silent ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Delta456 committed Jul 15, 2024
1 parent 18aa285 commit 5e2bb55
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions vlib/v/parser/struct.v
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ fn (mut p Parser) struct_decl(is_anon bool) ast.StructDecl {
start_type_pos := p.tok.pos()
if field_name == p.tok.lit && p.tok.lit[0].is_capital() {
p.error('field-name `${p.tok.lit}` cannot be same as the type-name')
return ast.StructDecl{}
}
typ = p.parse_type()
type_pos = start_type_pos.extend(p.prev_tok.pos())
Expand Down

0 comments on commit 5e2bb55

Please sign in to comment.