Meg's Mirrors
zig
about
heads
tags
log
tree
search
Search
zig
test
cases
compile_errors
assign_to_constant_field.zig
pretty
plain
permalink
blame
history
•
13 lines
•
187 B
1
const Foo = struct {
2
field: i32,
3
};
4
export fn derp() void {
5
const f = Foo{
6
.field = 1234,
7
};
8
f.field = 0;
9
}
10
11
// error
12
//
13
// :8:6: error: cannot assign to constant