mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vlib: change [0;n]
to [0].repeat(n)
This commit is contained in:

committed by
Alexander Medvednikov

parent
602e472b8a
commit
f077fbd32d
@ -36,7 +36,7 @@ fn test_struct_levels() {
|
||||
assert c.nums[0] == 4
|
||||
c.b.a.val = 34
|
||||
assert c.b.a.val == 34
|
||||
c.b.a.nums = [0;0]
|
||||
c.b.a.nums = [0].repeat(0)
|
||||
c.b.a.nums << 0
|
||||
c.b.a.nums << 2
|
||||
assert c.b.a.nums.len == 2
|
||||
|
Reference in New Issue
Block a user