From 899c69caf1a5a9ba15262a145ca852d7b637c916 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Tue, 14 Jul 2020 17:24:06 +0200 Subject: [PATCH] checker: fix dup const test --- vlib/v/checker/checker.v | 2 +- vlib/v/checker/tests/const_field_name_duplicate_err.out | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index 4e57fb5cbf..379aeb6040 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -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 diff --git a/vlib/v/checker/tests/const_field_name_duplicate_err.out b/vlib/v/checker/tests/const_field_name_duplicate_err.out index e350b1a936..040afb7e50 100644 --- a/vlib/v/checker/tests/const_field_name_duplicate_err.out +++ b/vlib/v/checker/tests/const_field_name_duplicate_err.out @@ -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