Zig Version
0.12.0
Steps to Reproduce and Observed Behavior
conststd=@import("std");
constbuiltin=@import("builtin");
test {
consta: u32=0xCE94C13E;
constb: *constu32=&a;
constc: []constu32=b[0..1];
constd: []constu8=@ptrCast(c);
comptimestd.debug.assert(builtin.target.cpu.arch.endian() ==.little);
trystd.testing.expect(std.mem.eql(u8, d, &.{ 0x3E, 0xC1, 0x94, 0xCE }));
}test.zig:8:27: error: TODO: implement @ptrCast between slices changing the length
const d: []const u8 = @ptrCast(c);
^~~~~~~~~~~
Expected Behavior
all 1 tests passed.
have known about this error for quite some time but ran into it again just now and noticed there was no explicit tracking issue for it
Zig Version
0.12.0
Steps to Reproduce and Observed Behavior
Expected Behavior
all 1 tests passed.
have known about this error for quite some time but ran into it again just now and noticed there was no explicit tracking issue for it