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

parser: ptr++,*(ptr+1)

This commit is contained in:
BigBlack
2019-11-12 04:39:16 +08:00
committed by Alexander Medvednikov
parent bd34524a1c
commit 99169ae4ff
3 changed files with 18 additions and 2 deletions

View File

@ -5,6 +5,9 @@ fn test_pointer_arithmetic() {
mut parr := *int(arr.data)
parr += 1
assert 2 == *parr
parr++
assert 3 == *parr
assert *(parr + 1) == 4
}
}