diff options
| author | r00ster91 <r00ster91@proton.me> | 2023-05-28 02:40:23 +0200 |
|---|---|---|
| committer | r00ster91 <r00ster91@proton.me> | 2023-06-27 19:57:23 -0400 |
| commit | 18fe951e24e55c7c732c3f1fc6bf412d7c4e2710 (patch) | |
| tree | 484334c67049468148ca90244cf2c8bbb27a86db | |
| parent | 78da0e40a8336dcd140ee2cf04aa6ee3166e67f3 (diff) | |
| download | zig-18fe951e24e55c7c732c3f1fc6bf412d7c4e2710.tar.gz zig-18fe951e24e55c7c732c3f1fc6bf412d7c4e2710.zip | |
test cases: returning undefined [:0]const u8
Closes #5947
| -rw-r--r-- | test/cases/returning_undefined_sentinel_terminated_const_u8_slice.zig | 11 |
1 files 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 new file mode 100644 index 0000000000..2bf585c5bd --- /dev/null +++ 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 |
