I can use this kind of syntax to make a decls list out of the fields of a struct:
constinfo=@TypeInfo(<type>);constfields=info.@"struct".fields;constdecls:[fields.len]std.builtin.Type.Declarations=undefined;inlinefor(fields,0..)|f,i|{decls[i]=.{.name=f.name};}
that is really annoying because I'm trying to port to some complex API of another library and I'd rather do it like that than hardcode 300+ struct fields (yes this is my actual case) manually with a function that returns a struct like this
pubfntoDecls(comptimeself:<type>)type{returnstruct{pubconstfield1=self.field1;etc..};}
and I need to set values for the decls, public decls without values are useless, please get this fixed.
I can use this kind of syntax to make a decls list out of the fields of a struct:
```zig
const info = @TypeInfo(<type>);
const fields = info.@"struct".fields;
const decls: [fields.len]std.builtin.Type.Declarations = undefined;
inline for (fields, 0..) |f, i| {
decls[i] = .{ .name = f.name };
}
```
that is really annoying because I'm trying to port to some complex API of another library and I'd rather do it like that than hardcode 300+ struct fields (yes this is my actual case) manually with a function that returns a struct like this
```zig
pub fn toDecls(comptime self: <type>) type {
return struct {
pub const field1 = self.field1;
etc..
};
}
```
and I need to set values for the decls, public decls without values are useless, please get this fixed.