mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
match: else
This commit is contained in:
@ -2,10 +2,11 @@ fn test_match() {
|
||||
a := 3
|
||||
mut b := 0
|
||||
match a {
|
||||
2 => println('two')
|
||||
3 => println('three')
|
||||
b = 3
|
||||
4 => println('four')
|
||||
2 => println('two')
|
||||
3 => println('three')
|
||||
b = 3
|
||||
4 => println('four')
|
||||
else => println('???')
|
||||
}
|
||||
assert b == 3
|
||||
}
|
||||
|
Reference in New Issue
Block a user