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

parser: fix a & b == c precedence

This commit is contained in:
Alexander Medvednikov
2019-11-29 22:42:32 +03:00
parent e957fd6f30
commit f724a956b3
2 changed files with 30 additions and 13 deletions

View File

@@ -66,6 +66,15 @@ fn test_str_methods() {
assert u64(-1).str() == '18446744073709551615'
}
fn test_and() {
c:=[1,2,3,4,5]
assert c[0] & 1 != 0
assert c[1] & 1 == 0
assert c[2] & 1 != 0
assert c[3] & 1 == 0
assert c[4] & 1 != 0
}
/*
fn test_cmp() {
assert 1 ≠ 2