mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
array: reverse empty arrays correctly
This commit is contained in:
@@ -266,6 +266,10 @@ fn test_reverse() {
|
||||
for i, _ in d {
|
||||
assert d[i] == b[b.len - i - 1]
|
||||
}
|
||||
|
||||
e := []int
|
||||
f := e.reverse()
|
||||
assert f.len == 0
|
||||
}
|
||||
|
||||
const (
|
||||
|
Reference in New Issue
Block a user