mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
added compile_error test coverage for issue 17166
This commit is contained in:
parent
84ece5624a
commit
a8d3760c5b
@ -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'
|
||||
Loading…
x
Reference in New Issue
Block a user