checker: fix dup const test

pull/5829/head
Alexander Medvednikov 2020-07-14 17:24:06 +02:00
parent 880c8e4dc9
commit 899c69caf1
2 changed files with 2 additions and 2 deletions

View File

@ -1888,7 +1888,7 @@ fn (mut c Checker) stmt(node ast.Stmt) {
for i, field in node.fields {
// TODO Check const name once the syntax is decided
if field.name in c.const_names {
c.error('duplciate const `$field.name`', field.pos)
c.error('duplicate const `$field.name`', field.pos)
}
c.const_names << field.name
field_names << field.name

View File

@ -1,4 +1,4 @@
vlib/v/checker/tests/const_field_name_duplicate_err.v:3:2: error: field name `aaa` duplicate
vlib/v/checker/tests/const_field_name_duplicate_err.v:3:2: error: duplicate const `aaa`
1 | const (
2 | aaa = 1
3 | aaa = 2