zig

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

runtime_index_out_of_bounds.zig (122B) - Raw


      1 pub fn main() void {
      2     const x = foo("hello");
      3     _ = x;
      4 }
      5 
      6 fn foo(x: []const u8) u8 {
      7     return x[5];
      8 }
      9 
     10 // exe=fail