issue with array initialization using index #23224
-
I just started working with V, and while experimenting with arrays I stumbled upon the following. array := []i32{len: 3, init: index}
error: expected `i32`, not `int` |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Read this section: https://docs.vlang.io/v-types.html#primitive-types |
Beta Was this translation helpful? Give feedback.
-
For now, In any case, this is a bug. |
Beta Was this translation helpful? Give feedback.
For now,
i32
andint
should be treated the same.int
is supposed to be changed at some point so it will either bei32
ori64
, depending on the system.In any case, this is a bug.
index
should always be the correct type to init the array, not a fixedint
.#23225