added compile_error test coverage for issue 17166

This commit is contained in:
Benjamin Thompson 2025-02-21 16:00:37 +10:00 committed by GitHub
parent 84ece5624a
commit a8d3760c5b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,11 @@
export fn concat_of_empty_slice_len_increment_beyond_bounds() void {
comptime {
var list: []u8 = &.{};
list.len += 1;
list = list ++ list;
}
}
// error
//
// :5:16: error: dereference of '*[1]u8' exceeds bounds of containing decl of type '[0]u8'