Meg's Mirrors
zig
about
heads
tags
log
tree
search
Search
zig
test
cases
compile_errors
assign_to_constant_destructure.zig
pretty
plain
permalink
blame
history
•
13 lines
•
226 B
1
export fn a() void {
2
const S = struct {
3
fn b() struct { usize, usize } {
4
return .{ 0, 0 };
5
}
6
};
7
const c, _ = S.b();
8
c += 10;
9
}
10
11
// error
12
//
13
// :8:5: error: cannot assign to constant