mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-06-10 09:28:21 -04:00
13 lines
193 B
Zig
13 lines
193 B
Zig
pub fn reassign(s: []const u8) void {
|
|
s = s[0..];
|
|
}
|
|
export fn entry() void {
|
|
reassign("foo");
|
|
}
|
|
|
|
// error
|
|
// backend=llvm
|
|
// target=native
|
|
//
|
|
// :2:10: error: cannot assign to constant
|