v2 / vlib / v / parser / tests / postfix_err_a.out
25 lines · 25 sloc · 803 bytes · 3d60410b605d001e54f280070d5f952da9de1112
Raw
1vlib/v/parser/tests/postfix_err_a.vv:5:8: warning: `++` operator can only be used as a statement
2 3 | fn test_postfix() {
3 4 | mut x := 1
4 5 | _ = (x++)
5 | ~~
6 6 | x--, x-- // OK
7 7 | f(x++)
8vlib/v/parser/tests/postfix_err_a.vv:7:5: warning: `++` operator can only be used as a statement
9 5 | _ = (x++)
10 6 | x--, x-- // OK
11 7 | f(x++)
12 | ~~
13 8 | a := [x]
14 9 | _ = a[x--]
15vlib/v/parser/tests/postfix_err_a.vv:9:9: warning: `--` operator can only be used as a statement
16 7 | f(x++)
17 8 | a := [x]
18 9 | _ = a[x--]
19 | ~~
20 10 | }
21vlib/v/parser/tests/postfix_err_a.vv:1:6: notice: unused parameter: `i`
22 1 | fn f(i int) {}
23 | ^
24 2 |
25 3 | fn test_postfix() {
26