Meg's Mirrors
zig
about
heads
tags
log
tree
search
Search
zig
test
cases
compile_errors
slice_of_null_pointer.zig
pretty
plain
permalink
blame
history
•
10 lines
•
172 B
1
comptime {
2
var x: [*c]u8 = null;
3
var runtime_len: usize = 0;
4
_ = &runtime_len;
5
_ = x[0..runtime_len];
6
}
7
8
// error
9
//
10
// :5:10: error: slice of null pointer