-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
acceptedThis proposal is planned.This proposal is planned.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone
Description
Zig Version
0.11.0-dev.1584+9ccd8ed0a
Steps to Reproduce and Observed Behavior
const std = @import("std");
test {
const a = [_]u8{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
const b = &a;
const c: [*]const u8 = b;
foo(c[2..][0..3]);
}
fn foo(x: []const u8) !void {
try std.testing.expectEqualSlices(u8, &.{ 2, 3, 4 }, x);
}test.zig:7:10: error: slice of pointer must include end value
foo(c[2..][0..3]);
~^~~~~
Expected Behavior
all tests passed
Jarred-Sumner, rohlem, scheibo, notcancername, ethernetsellout and 1 moremluggSnosMe
Metadata
Metadata
Assignees
Labels
acceptedThis proposal is planned.This proposal is planned.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.