1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

new match statement

This commit is contained in:
Alexander Medvednikov
2019-07-17 01:43:59 +02:00
parent 3f506714ec
commit a9463a180d
4 changed files with 35 additions and 8 deletions

View File

@@ -0,0 +1,11 @@
fn test_switch() {
a := 3
mut b := 0
match a {
2 => println('two')
3 => println('three')
b = 3
4 => println('4')
}
assert b == 3
}