Skip to content

Commit a8d3760

Browse files
authored
added compile_error test coverage for issue 17166
1 parent 84ece56 commit a8d3760

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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'

0 commit comments

Comments
 (0)