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

negative enum vals + [10]C.Foo fix

This commit is contained in:
Alexander Medvednikov
2019-12-21 10:35:29 +03:00
parent faca61c50a
commit 31b7991a93
3 changed files with 30 additions and 2 deletions

View File

@ -39,3 +39,18 @@ fn test_match() {
println(color)
assert num == 3
}
enum Foo {
a = 1
b = 2
c = 3
d = -10
}
fn test_nums() {
foo := Foo.a
assert foo == 1
assert Foo.c == 3
d := Foo.d
assert d == -10
}