-
-
Notifications
You must be signed in to change notification settings - Fork 384
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Zig Version
0.11.0-dev.3322+82632aff2
Zig Language Server Version
0.11.0-dev.469+4f0762a
Steps to Reproduce
Using VS Code with the Zig extension, with the following code:
const my_slice: []const f32 = &.{1, 2, 3, 4};
std.debug.print("{d:.3}", .{ my_slice[0..2] });
Enter a dot after my_slice[0..2]
to trigger auto-completion.
Expected Behavior
Since the range is comptime-known, the type of my_slice[0..2]
is *[2]f32
, so typing .
after my_slice[0..2]
should open an autocomplete window that includes *
.
Actual Behavior
Autocompleted suggestions are len
and ptr
, but not *
.
This can be further validated by assigning the subslice to a variable and inspecting its type (by hovering over it), which is reported as []const f32
.
const my_subslice = my_slice[0..2];
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working