| author | |
| committer | |
| log | a8d3760c5bc31ed114516c89f31d9107b803a6b7 |
| tree | bcd7de1fb8b89b1c7a09e3f98294752ca4e55770 |
| parent | 84ece5624a153da44faca52ff622cd03b887d375 |
| signature |
1 files changed, 11 insertions(+), 0 deletions(-)
test/cases/compile_errors/concat_of_empty_slice_len_increment_beyond_bounds.zig created+11| ... | @@ -0,0 +1,11 @@ | ||
| 1 | export fn concat_of_empty_slice_len_increment_beyond_bounds() void { | ||
| 2 | comptime { | ||
| 3 | var list: []u8 = &.{}; | ||
| 4 | list.len += 1; | ||
| 5 | list = list ++ list; | ||
| 6 | } | ||
| 7 | } | ||
| 8 | |||
| 9 | // error | ||
| 10 | // | ||
| 11 | // :5:16: error: dereference of '*[1]u8' exceeds bounds of containing decl of type '[0]u8' | ||