You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
string literal a.k.a single item pointer to array e.g. " "
tuple e.g. .{' '}
a single item pointer to tuple e.g. &.{' '} Not permitted by Zig even though it is "indexable" with comptime known length
comptime known slice e.g. @as([]const u8, " ")
To those who are interested in taking on this issue, some of the above cases are not easily implemented. It is recommended to only handle arrays and single item pointers to arrays excluding string literals. All other types are currently not easily handled in ZLS's analysis backend. The implementation would need to be added to resolveTypeOfNode.
The following operands are allowed for
**
and++
:[1]u8{' '}
&[1]u8{' '}
" "
.{' '}
a single item pointer to tuple e.g.Not permitted by Zig even though it is "indexable" with comptime known length&.{' '}
@as([]const u8, " ")
To those who are interested in taking on this issue, some of the above cases are not easily implemented. It is recommended to only handle arrays and single item pointers to arrays excluding string literals. All other types are currently not easily handled in ZLS's analysis backend. The implementation would need to be added to resolveTypeOfNode.
For information on what these operators do, refer to the Zig Language Reference.
The text was updated successfully, but these errors were encountered: