vxx2 / vlib / v / checker / tests / infix_err.out
140 lines · 140 sloc · 4.67 KB · fa0e4c8f357952d5191dcd4c2c14d45dfd093a24
Raw
1vlib/v/checker/tests/infix_err.vv:13:5: error: mismatched types `string` and `?string`
2 11 | }
3 12 |
4 13 | _ = '' + f()
5 | ~~~~~~~~
6 14 | _ = f() + ''
7 15 | _ = f() + f()
8vlib/v/checker/tests/infix_err.vv:13:10: error: `?string` cannot be used as `string`, unwrap the option first
9 11 | }
10 12 |
11 13 | _ = '' + f()
12 | ~~~
13 14 | _ = f() + ''
14 15 | _ = f() + f()
15vlib/v/checker/tests/infix_err.vv:14:5: error: mismatched types `?string` and `string`
16 12 |
17 13 | _ = '' + f()
18 14 | _ = f() + ''
19 | ~~~~~~~~
20 15 | _ = f() + f()
21 16 |
22vlib/v/checker/tests/infix_err.vv:14:5: error: `?string` cannot be used as `string`, unwrap the option first
23 12 |
24 13 | _ = '' + f()
25 14 | _ = f() + ''
26 | ~~~
27 15 | _ = f() + f()
28 16 |
29vlib/v/checker/tests/infix_err.vv:15:5: error: `?string` cannot be used as `string`, unwrap the option first
30 13 | _ = '' + f()
31 14 | _ = f() + ''
32 15 | _ = f() + f()
33 | ~~~
34 16 |
35 17 | _ = 4 + g()
36vlib/v/checker/tests/infix_err.vv:17:9: error: `?int` cannot be used as `int literal`, unwrap the option first
37 15 | _ = f() + f()
38 16 |
39 17 | _ = 4 + g()
40 | ~~~
41 18 | _ = int(0) + g()
42 19 | _ = g() + int(3)
43vlib/v/checker/tests/infix_err.vv:18:14: error: `?int` cannot be used as `int`, unwrap the option first
44 16 |
45 17 | _ = 4 + g()
46 18 | _ = int(0) + g()
47 | ~~~
48 19 | _ = g() + int(3)
49 20 | _ = g() + 3
50vlib/v/checker/tests/infix_err.vv:19:5: error: `?int` cannot be used as `int`, unwrap the option first
51 17 | _ = 4 + g()
52 18 | _ = int(0) + g()
53 19 | _ = g() + int(3)
54 | ~~~
55 20 | _ = g() + 3
56 21 |
57vlib/v/checker/tests/infix_err.vv:20:5: error: `?int` cannot be used as `int literal`, unwrap the option first
58 18 | _ = int(0) + g()
59 19 | _ = g() + int(3)
60 20 | _ = g() + 3
61 | ~~~
62 21 |
63 22 | // binary operands
64vlib/v/checker/tests/infix_err.vv:23:5: error: left operand for `&&` is not a boolean
65 21 |
66 22 | // binary operands
67 23 | _ = 1 && 2
68 | ^
69 24 | _ = true || 2
70 25 |
71vlib/v/checker/tests/infix_err.vv:23:10: error: right operand for `&&` is not a boolean
72 21 |
73 22 | // binary operands
74 23 | _ = 1 && 2
75 | ^
76 24 | _ = true || 2
77 25 |
78vlib/v/checker/tests/infix_err.vv:24:13: error: right operand for `||` is not a boolean
79 22 | // binary operands
80 23 | _ = 1 && 2
81 24 | _ = true || 2
82 | ^
83 25 |
84 26 | // boolean expressions
85vlib/v/checker/tests/infix_err.vv:24:5: error: infix expr: cannot use `int literal` (right expression) as `bool`
86 22 | // binary operands
87 23 | _ = 1 && 2
88 24 | _ = true || 2
89 | ~~~~~~~~~
90 25 |
91 26 | // boolean expressions
92vlib/v/checker/tests/infix_err.vv:27:22: error: ambiguous boolean expression. use `()` to ensure correct order of operations
93 25 |
94 26 | // boolean expressions
95 27 | _ = 1 == 1 && 2 == 2 || 3 == 3
96 | ~~
97 28 | _ = 1 == 1 && 2 == 2 || 3 == 3 && 4 == 4
98 29 | _ = 1 + println('')
99vlib/v/checker/tests/infix_err.vv:28:22: error: ambiguous boolean expression. use `()` to ensure correct order of operations
100 26 | // boolean expressions
101 27 | _ = 1 == 1 && 2 == 2 || 3 == 3
102 28 | _ = 1 == 1 && 2 == 2 || 3 == 3 && 4 == 4
103 | ~~
104 29 | _ = 1 + println('')
105 30 |
106vlib/v/checker/tests/infix_err.vv:29:5: error: mismatched types `int literal` and `void`
107 27 | _ = 1 == 1 && 2 == 2 || 3 == 3
108 28 | _ = 1 == 1 && 2 == 2 || 3 == 3 && 4 == 4
109 29 | _ = 1 + println('')
110 | ~~~~~~~~~~~~~~~
111 30 |
112 31 | // struct members
113vlib/v/checker/tests/infix_err.vv:36:11: error: `?string` cannot be used as `string`, unwrap the option first
114 34 | }
115 35 | name := 'a name'
116 36 | _ := data.name == 'a name'
117 | ~~~~
118 37 | _ := 'a name' == data.name
119 38 | _ := data.name == name
120vlib/v/checker/tests/infix_err.vv:37:23: error: `?string` cannot be used as `string`, unwrap the option first
121 35 | name := 'a name'
122 36 | _ := data.name == 'a name'
123 37 | _ := 'a name' == data.name
124 | ~~~~
125 38 | _ := data.name == name
126 39 | _ := name == data.name
127vlib/v/checker/tests/infix_err.vv:38:11: error: `?string` cannot be used as `string`, unwrap the option first
128 36 | _ := data.name == 'a name'
129 37 | _ := 'a name' == data.name
130 38 | _ := data.name == name
131 | ~~~~
132 39 | _ := name == data.name
133 40 |
134vlib/v/checker/tests/infix_err.vv:39:19: error: `?string` cannot be used as `string`, unwrap the option first
135 37 | _ := 'a name' == data.name
136 38 | _ := data.name == name
137 39 | _ := name == data.name
138 | ~~~~
139 40 |
140 41 | // these should not error
141