-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Describe the bug
The documentation of array slices doesn't point out that if you take a slice of an empty array of built-in type (for example uint8[]), the result is null. I assume this is correct behaviour and not a bug in the language! I see that this won't happen in general; for example, string.slice uses strndup, which will only return null on error; but I guess it will happen for slices of arrays of built-in types. Or at least, can happen; in my experiments, the data member of the array was null.
https://docs.vala.dev/tutorials/programming-language/main/02-00-basics/02-04-data-types.html
Metadata
Metadata
Assignees
Labels
No labels