v2 / vlib / v / checker / tests / var_duplicate_const.out
34 lines · 34 sloc · 1.46 KB · dc7d47597b285c66e4887daa5cf31b3886eb433f
Raw
1vlib/v/checker/tests/var_duplicate_const.vv:4:5: warning: duplicate of a const name `size`
2 2 |
3 3 | fn main() {
4 4 | size := 11
5 | ~~~~
6 5 | println(main.size)
7 6 | }
8vlib/v/checker/tests/var_duplicate_const.vv:4:5: warning: unused variable: `size`
9 2 |
10 3 | fn main() {
11 4 | size := 11
12 | ~~~~
13 5 | println(main.size)
14 6 | }
15vlib/v/checker/tests/var_duplicate_const.vv:1:7: notice: unused constant: `size`
16 1 | const size = 22
17 | ~~~~~~~~~
18 2 |
19 3 | fn main() {
20================== C compilation error (from cc): ==============
21cc: /tmp/v_502/var_duplicate_const.01KNN5X7W4MVH2B58E9FG5GJKE.tmp.c:2139:36: error: use of undeclared identifier 'size'
22cc: 2139 | builtin__println(builtin__int_str(size));
23cc: | ^
24cc: 1 error generated.
25================================================================
26Try passing `-g` when compiling, to see a .v file:line information, that correlates more with the C error.
27(Alternatively, pass `-show-c-output`, to print the full C error message).
28builder error:
29==================
30C error found while compiling generated C code.
31This can be caused by invalid C interop code, C compiler flags, or a V compiler bug.
32If your code is pure V and this still happens, please report it using `v bug file.v`,
33or goto https://github.com/vlang/v/issues/new/choose .
34You can also use #help on Discord: https://discord.gg/vlang .
35