mirror of
https://github.com/ziglang/zig.git
synced 2025-12-13 17:53:07 +00:00
12 lines
277 B
Zig
12 lines
277 B
Zig
export fn entry() void {
|
|
const y: [:1]const u8 = &[_:2]u8{ 1, 2 };
|
|
_ = y;
|
|
}
|
|
|
|
// error
|
|
// backend=stage2
|
|
// target=native
|
|
//
|
|
// :2:29: error: expected type '[:1]const u8', found '*const [2:2]u8'
|
|
// :2:29: note: pointer sentinel '2' cannot cast into pointer sentinel '1'
|