vxx2 / vlib / v / checker / tests / prefix_err.out
103 lines · 103 sloc · 2.86 KB · 2332ecff4811b8c97dfda8e825170e9397962519
Raw
1vlib/v/checker/tests/prefix_err.vv:5:6: error: cannot take the address of true
2 3 | }
3 4 |
4 5 | b := &true
5 | ^
6 6 | _ := &get()
7 7 | _ := &(get())
8vlib/v/checker/tests/prefix_err.vv:6:6: error: cannot take the address of get()
9 4 |
10 5 | b := &true
11 6 | _ := &get()
12 | ^
13 7 | _ := &(get())
14 8 | _ := &(get() + 1)
15vlib/v/checker/tests/prefix_err.vv:7:6: error: cannot take the address of get()
16 5 | b := &true
17 6 | _ := &get()
18 7 | _ := &(get())
19 | ^
20 8 | _ := &(get() + 1)
21 9 | _ := &10
22vlib/v/checker/tests/prefix_err.vv:8:6: error: cannot take the address of get() + 1
23 6 | _ := &get()
24 7 | _ := &(get())
25 8 | _ := &(get() + 1)
26 | ^
27 9 | _ := &10
28 10 | _ := &'Hi'
29vlib/v/checker/tests/prefix_err.vv:9:6: error: cannot take the address of 10
30 7 | _ := &(get())
31 8 | _ := &(get() + 1)
32 9 | _ := &10
33 | ^
34 10 | _ := &'Hi'
35 11 | _ := &'${b}'
36vlib/v/checker/tests/prefix_err.vv:10:6: error: cannot take the address of 'Hi'
37 8 | _ := &(get() + 1)
38 9 | _ := &10
39 10 | _ := &'Hi'
40 | ^
41 11 | _ := &'${b}'
42 12 | _ := &`c`
43vlib/v/checker/tests/prefix_err.vv:11:6: error: cannot take the address of '${b}'
44 9 | _ := &10
45 10 | _ := &'Hi'
46 11 | _ := &'${b}'
47 | ^
48 12 | _ := &`c`
49 13 | _ := &1.2
50vlib/v/checker/tests/prefix_err.vv:12:6: error: cannot take the address of `c`
51 10 | _ := &'Hi'
52 11 | _ := &'${b}'
53 12 | _ := &`c`
54 | ^
55 13 | _ := &1.2
56 14 | _ := &(1 + 2)
57vlib/v/checker/tests/prefix_err.vv:13:6: error: cannot take the address of 1.2
58 11 | _ := &'${b}'
59 12 | _ := &`c`
60 13 | _ := &1.2
61 | ^
62 14 | _ := &(1 + 2)
63 15 | _ := 12.3
64vlib/v/checker/tests/prefix_err.vv:14:6: error: cannot take the address of 1 + 2
65 12 | _ := &`c`
66 13 | _ := &1.2
67 14 | _ := &(1 + 2)
68 | ^
69 15 | _ := 12.3
70 16 |
71vlib/v/checker/tests/prefix_err.vv:18:5: error: invalid indirect of `int`, the type `int` is not a pointer
72 16 |
73 17 | a := 1
74 18 | _ = *a
75 | ^
76 19 | a <- 4
77 20 |
78vlib/v/checker/tests/prefix_err.vv:19:1: error: cannot push on non-channel `int`
79 17 | a := 1
80 18 | _ = *a
81 19 | a <- 4
82 | ^
83 20 |
84 21 | _ = ~true
85vlib/v/checker/tests/prefix_err.vv:21:5: error: operator `~` can only be used with integer types, but the value after `~` is of type `bool` instead
86 19 | a <- 4
87 20 |
88 21 | _ = ~true
89 | ^
90 22 | _ = !4
91 23 |
92vlib/v/checker/tests/prefix_err.vv:22:5: error: operator `!` can only be used with bool types, but the value after `!` is of type `int literal` instead
93 20 |
94 21 | _ = ~true
95 22 | _ = !4
96 | ^
97 23 |
98 24 | mut arr := [12, 4]
99vlib/v/checker/tests/prefix_err.vv:25:11: error: cannot take the address of mutable array elements outside unsafe blocks
100 23 |
101 24 | mut arr := [12, 4]
102 25 | _ := (&arr[1])
103 | ~~~
104