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:

committed by
Alexander Medvednikov

parent
bd34524a1c
commit
99169ae4ff
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user