Closed krichprollsch closed 10 months ago
A lot of them are from a dereferencing pattern, const x = alloc.create(T); x.* = y;
.
I thought that in that case var
was mandatory, as we are changing the value afterwards. It seems it's not.
Good to know, thanks.
A lot of them are from a dereferencing pattern,
const x = alloc.create(T); x.* = y;
. I thought that in that casevar
was mandatory, as we are changing the value afterwards. It seems it's not. Good to know, thanks.
AFAIK in const x
when x is a pointer, the const means you can't change the address you point to. But you can change the pointed value itself.
Thanks to zig 0.12 for automatic detection
Relates to https://github.com/Browsercore/project/issues/93