blob: 1392251852e9b535277064d208e000e6147ef7ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
vlib/v/checker/tests/enum_op_err.vv:8:20: error: only `==` and `!=` are defined on `enum`, use an explicit cast to `int` if needed
6 |
7 | fn main() {
8 | println(Color.red > Color.green)
| ^
9 | println(Color.red + Color.green)
10 | println(Color.red && Color.green)
vlib/v/checker/tests/enum_op_err.vv:9:20: error: only `==` and `!=` are defined on `enum`, use an explicit cast to `int` if needed
7 | fn main() {
8 | println(Color.red > Color.green)
9 | println(Color.red + Color.green)
| ^
10 | println(Color.red && Color.green)
11 | println(Color.red | Color.green)
vlib/v/checker/tests/enum_op_err.vv:10:10: error: left operand for `&&` is not a boolean
8 | println(Color.red > Color.green)
9 | println(Color.red + Color.green)
10 | println(Color.red && Color.green)
| ~~~~~~~~~
11 | println(Color.red | Color.green)
12 | println(Color.red & Color.green)
vlib/v/checker/tests/enum_op_err.vv:11:20: error: only `==` and `!=` are defined on `enum`, use an explicit cast to `int` if needed
9 | println(Color.red + Color.green)
10 | println(Color.red && Color.green)
11 | println(Color.red | Color.green)
| ^
12 | println(Color.red & Color.green)
13 | }
vlib/v/checker/tests/enum_op_err.vv:12:20: error: only `==` and `!=` are defined on `enum`, use an explicit cast to `int` if needed
10 | println(Color.red && Color.green)
11 | println(Color.red | Color.green)
12 | println(Color.red & Color.green)
| ^
13 | }
|