| 1 | export fn foo_slice_len_increment_beyond_bounds() void { |
| 2 | comptime { |
| 3 | var buf_storage: [8]u8 = undefined; |
| 4 | var buf: []u8 = buf_storage[0..]; |
| 5 | buf.len += 1; |
| 6 | buf[8] = 42; |
| 7 | } |
| 8 | } |
| 9 | |
| 10 | // error |
| 11 | // |
| 12 | // :6:16: error: dereference of '*u8' exceeds bounds of containing decl of type '[8]u8' |