Meg's Mirrors
zig
about
heads
tags
log
tree
search
Search
zig
test
cases
compile_errors
write_to_const_global_variable.zig
pretty
plain
permalink
blame
history
•
11 lines
•
137 B
1
const x: i32 = 99;
2
fn f() void {
3
x = 1;
4
}
5
export fn entry() void {
6
f();
7
}
8
9
// error
10
//
11
// :3:5: error: cannot assign to constant