mirror of
https://github.com/ziglang/zig.git
synced 2024-11-28 16:12:33 +00:00
15 lines
306 B
Zig
15 lines
306 B
Zig
var s_buffer: [10]u8 = undefined;
|
|
pub fn pass(in: []u8) []u8 {
|
|
var out = &s_buffer;
|
|
out.*.* = in[0];
|
|
return out.*[0..1];
|
|
}
|
|
|
|
export fn entry() usize { return @sizeOf(@TypeOf(&pass)); }
|
|
|
|
// error
|
|
// backend=stage2
|
|
// target=native
|
|
//
|
|
// :4:10: error: cannot dereference non-pointer type '[10]u8'
|