Meg's Mirrors
zig
about
heads
tags
log
tree
search
Search
zig
test
cases
compile_errors
reassign_to_slice_parameter.zig
pretty
plain
permalink
blame
history
•
10 lines
•
159 B
1
pub fn reassign(s: []const u8) void {
2
s = s[0..];
3
}
4
export fn entry() void {
5
reassign("foo");
6
}
7
8
// error
9
//
10
// :2:5: error: cannot assign to constant