zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 18fe951e24e55c7c732c3f1fc6bf412d7c4e2710 (tree)
parent 78da0e40a8336dcd140ee2cf04aa6ee3166e67f3
Author: r00ster91 <r00ster91@proton.me>
Date:   Sun, 28 May 2023 02:40:23 +0200

test cases: returning undefined [:0]const u8

Closes #5947

Diffstat:
Atest/cases/returning_undefined_sentinel_terminated_const_u8_slice.zig | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/test/cases/returning_undefined_sentinel_terminated_const_u8_slice.zig b/test/cases/returning_undefined_sentinel_terminated_const_u8_slice.zig @@ -0,0 +1,11 @@ +fn foo() [:0]const u8 { + return undefined; +} +pub fn main() void { + var guid: [*:0]const u8 = undefined; + guid = foo(); +} + +// run +// backend=llvm +// target=native