| 1 | vlib/v/checker/tests/enum_as_int_err.vv:9:10: error: cannot assign to `color`: expected `Color`, not `int literal` |
| 2 | 7 | mut color := Color.red |
| 3 | 8 | mut foo := 1 |
| 4 | 9 | color = 1 |
| 5 | | ^ |
| 6 | 10 | foo = Color.red |
| 7 | 11 | println(color == 0) |
| 8 | vlib/v/checker/tests/enum_as_int_err.vv:10:8: error: cannot assign to `foo`: expected `int`, not `Color` |
| 9 | 8 | mut foo := 1 |
| 10 | 9 | color = 1 |
| 11 | 10 | foo = Color.red |
| 12 | | ~~~~~~~~~ |
| 13 | 11 | println(color == 0) |
| 14 | 12 | _ = foo |
| 15 | vlib/v/checker/tests/enum_as_int_err.vv:11:10: error: infix expr: cannot use `int literal` (right expression) as `Color` |
| 16 | 9 | color = 1 |
| 17 | 10 | foo = Color.red |
| 18 | 11 | println(color == 0) |
| 19 | | ~~~~~~~~~~ |
| 20 | 12 | _ = foo |
| 21 | 13 | } |
| 22 | |