diff --git a/vlib/v/checker/infix.v b/vlib/v/checker/infix.v index 92af3bf50bc661..4c241891bf6638 100644 --- a/vlib/v/checker/infix.v +++ b/vlib/v/checker/infix.v @@ -964,7 +964,7 @@ fn (mut c Checker) check_duplicated_items(node &ast.ArrayInit) { if item.str() !in unique_items { unique_items << item_str } else { - c.error('item `${item_str}` is duplicated in the list', item.pos()) + c.note('item `${item_str}` is duplicated in the list', item.pos()) } } } diff --git a/vlib/v/checker/tests/infix_dup_in_err.out b/vlib/v/checker/tests/infix_dup_in_err.out index 8d6c95737989da..4feb328daf69c9 100644 --- a/vlib/v/checker/tests/infix_dup_in_err.out +++ b/vlib/v/checker/tests/infix_dup_in_err.out @@ -1,9 +1,9 @@ -vlib/v/checker/tests/infix_dup_in_err.vv:1:16: error: the item `2` is duplicated in the list +vlib/v/checker/tests/infix_dup_in_err.vv:1:16: notice: item `2` is duplicated in the list 1 | if 1 in [1, 2, 2, 2] { println('ok') } | ^ 2 | 3 | a := `a` -vlib/v/checker/tests/infix_dup_in_err.vv:4:20: error: the item `a` is duplicated in the list +vlib/v/checker/tests/infix_dup_in_err.vv:4:20: notice: item `a` is duplicated in the list 2 | 3 | a := `a` 4 | if `a` in [`c`, a, a] { println('ok') }