Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing checker notice/warning for a known duplicate value in a if x in [val1, val1, val2] { #22305

Closed
spytheman opened this issue Sep 25, 2024 · 0 comments · Fixed by #22308
Closed
Assignees
Labels
Feature Request This issue is made to request a feature. Good First Issue (easy task) This issue is suitable to be worked on by new contributors. Unit: Checker Bugs/feature requests, that are related to the type checker.

Comments

@spytheman
Copy link
Member

spytheman commented Sep 25, 2024

V doctor:

V full version: V 0.4.7 4ee948f.1a4ad55
OS: linux, Ubuntu 20.04.6 LTS
Processor: 2 cpus, 64bit, little endian, Intel(R) Core(TM) i3-3225 CPU @ 3.30GHz

getwd: /space/v/oo
vexe: /space/v/oo/v
vexe mtime: 2024-09-25 08:03:20

vroot: OK, value: /space/v/oo
VMODULES: OK, value: /home/delian/.vmodules
VTMP: OK, value: /tmp/v_1000

Git version: git version 2.46.0
Git vroot status: weekly.2024.39-12-g1a4ad556
.git/config present: true

CC version: cc (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0
thirdparty/tcc status: thirdparty-linux-amd64 0134e9b9

What did you do?
./v -g -o vdbg cmd/v && ./vdbg /v/misc/2024_09_25__11/a.v

if 1 in [1, 2, 2, 2] { println('ok') }
println('done')

What did you expect to see?

A compiler notice or warning, that 2 is a duplicate value in the condition list, used for the x in list check .

What did you see instead?

ok
done

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@spytheman spytheman added Feature Request This issue is made to request a feature. Good First Issue (easy task) This issue is suitable to be worked on by new contributors. Unit: Checker Bugs/feature requests, that are related to the type checker. labels Sep 25, 2024
@felipensp felipensp self-assigned this Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request This issue is made to request a feature. Good First Issue (easy task) This issue is suitable to be worked on by new contributors. Unit: Checker Bugs/feature requests, that are related to the type checker.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants