From cce58f41af2e0c780f0d69e7770bfe6c3456171c Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Wed, 25 Sep 2024 08:32:17 -0300 Subject: [PATCH] test --- vlib/v/checker/tests/infix_dup_in_err.out | 12 ++++++++++++ vlib/v/checker/tests/infix_dup_in_err.vv | 6 ++++++ 2 files changed, 18 insertions(+) create mode 100644 vlib/v/checker/tests/infix_dup_in_err.out create mode 100644 vlib/v/checker/tests/infix_dup_in_err.vv diff --git a/vlib/v/checker/tests/infix_dup_in_err.out b/vlib/v/checker/tests/infix_dup_in_err.out new file mode 100644 index 00000000000000..8d6c95737989da --- /dev/null +++ b/vlib/v/checker/tests/infix_dup_in_err.out @@ -0,0 +1,12 @@ +vlib/v/checker/tests/infix_dup_in_err.vv:1:16: error: the 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 + 2 | + 3 | a := `a` + 4 | if `a` in [`c`, a, a] { println('ok') } + | ^ + 5 | + 6 | println('done') diff --git a/vlib/v/checker/tests/infix_dup_in_err.vv b/vlib/v/checker/tests/infix_dup_in_err.vv new file mode 100644 index 00000000000000..06b9e37b9337d4 --- /dev/null +++ b/vlib/v/checker/tests/infix_dup_in_err.vv @@ -0,0 +1,6 @@ +if 1 in [1, 2, 2, 2] { println('ok') } + +a := `a` +if `a` in [`c`, a, a] { println('ok') } + +println('done') \ No newline at end of file