I am returning an anonyous struct from a function, something like: return .{ .a = 1, .b = 2 };
Question: is it possible to reference an already initialized field of the struct being created/returned, to initialize another one ?
I have tried: return .{ .a = 1, .b = .a + 1 };
But it doesn't work. I belive I need an outter reference, like a self. functionName.a doesn't work either.
I know a workaround is storing the values in consts before the return, but I just wanna know if it is possible to avoid that.