I'm trying to allocate an array of integer slices. However, the types don't seem to be detected by alloc
properly.
I try to immediately return the result of alloc
:
fn create_array() *[64][]int = {
return alloc([[]...]);
};
errors with
Error testalloc.ha:2:15: Return value **[64][]int is not assignable to function result type *[64][]int
If instead I just try to assign to a variable:
fn create_array2() void = {
let arr: *[64][]int = alloc([[]...]);
};
The compiler errors with
Error testalloc.ha:2:12: Initializer is not assignable to binding type