v2 / vlib / v / checker / tests / comptime_match_cond_cannot_mut.out
14 lines · 14 sloc · 510 bytes · 603cd903374f915e72df23d559d648f5804ae770
Raw
1vlib/v/checker/tests/comptime_match_cond_cannot_mut.vv:3:9: error: `x` is mut and may have changed since its definition
2 1 | fn main() {
3 2 | mut x := 1
4 3 | $match x {
5 | ^
6 4 | 1 {
7 5 | println('1')
8vlib/v/checker/tests/comptime_match_cond_cannot_mut.vv:13:13: error: `$match` condition `y` can not be mutable
9 11 |
10 12 | y := 100
11 13 | $match mut y {
12 | ^
13 14 | 100 {
14 15 | println('100')
15