vxx2 / vlib / v / checker / tests / static_init_err.out
41 lines · 41 sloc · 1.32 KB · 1e0bda4ebcf4559b24b46fb019264fb09ddffd9a
Raw
1vlib/v/checker/tests/static_init_err.vv:10:2: warning: function `foo` must be called from an `unsafe` block
2 8 |
3 9 | fn main() {
4 10 | foo()
5 | ~~~~~
6 11 | }
7vlib/v/checker/tests/static_init_err.vv:4:9: warning: unused variable: `aa`
8 2 | fn foo() {
9 3 | b := 23
10 4 | static aa := b
11 | ~~
12 5 | static bb := 1 + 1
13 6 | static cc := ''.str()
14vlib/v/checker/tests/static_init_err.vv:5:9: warning: unused variable: `bb`
15 3 | b := 23
16 4 | static aa := b
17 5 | static bb := 1 + 1
18 | ~~
19 6 | static cc := ''.str()
20 7 | }
21vlib/v/checker/tests/static_init_err.vv:6:9: warning: unused variable: `cc`
22 4 | static aa := b
23 5 | static bb := 1 + 1
24 6 | static cc := ''.str()
25 | ~~
26 7 | }
27 8 |
28vlib/v/checker/tests/static_init_err.vv:4:9: error: cannot initialized static variable with non-constant value
29 2 | fn foo() {
30 3 | b := 23
31 4 | static aa := b
32 | ~~
33 5 | static bb := 1 + 1
34 6 | static cc := ''.str()
35vlib/v/checker/tests/static_init_err.vv:6:9: error: cannot initialized static variable with non-constant value
36 4 | static aa := b
37 5 | static bb := 1 + 1
38 6 | static cc := ''.str()
39 | ~~
40 7 | }
41 8 |
42