zig

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

test_string_literal_to_slice.zig (158B) - Raw


      1 fn foo(s: []u8) void {
      2     _ = s;
      3 }
      4 
      5 test "string literal to mutable slice" {
      6     foo("hello");
      7 }
      8 
      9 // test_error=expected type '[]u8', found '*const [5:0]u8'