Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
checker
/
tests
/
flag_enum_exhaustive_else_branch.vv
16
lines
·
14
sloc
·
250 bytes
·
757929392e0e7a75fc1272116460981e589737d5
Raw
1
@[flag]
2
enum Permission {
3
read
4
write
5
execute
6
}
7
8
perm := Permission.read | Permission.write | Permission.execute
9
dump(perm)
10
11
match perm {
12
.read { println('r') }
13
.write { println('w') }
14
.execute { println('x') }
15
// must require an `else` here
16
}
17