Zig Version
0.17.0-dev.956+2dca73595
Steps to Reproduce, Observed Behavior, and Expected Behavior
pubfnDemo1()type{returnunion{/// first fieldfield1:i32,/// second fieldfield2:u32,/// the init functionpubfninit()@This(){return.{.field1=10};}};}pubconstDemo2=union(enum){/// first fieldfield1:i32,/// second fieldfield2:u32,/// the init functionpubfninit()@This(){return.{.field1=10};}};pubfnDemo3()type{returnunion(enum){/// first field, missing in docfield1:i32,/// second field, also missingfield2:u32,/// the init functionpubfninit()@This(){return.{.field1=10};}};}The generated html documentation (with zig build-lib -femit-docs demo.zig) correctly contains the init function and the fields for Demo1 (function returning bare union) and Demo2 (tagged union).
But for Demo3 (function returning tagged union), it only contains the init function, the fields are missing.
### Zig Version
0.17.0-dev.956+2dca73595
### Steps to Reproduce, Observed Behavior, and Expected Behavior
```zig
pub fn Demo1() type {
return union {
/// first field
field1: i32,
/// second field
field2: u32,
/// the init function
pub fn init() @This() {
return .{ .field1 = 10 };
}
};
}
pub const Demo2 = union(enum) {
/// first field
field1: i32,
/// second field
field2: u32,
/// the init function
pub fn init() @This() {
return .{ .field1 = 10 };
}
};
pub fn Demo3() type {
return union(enum) {
/// first field, missing in doc
field1: i32,
/// second field, also missing
field2: u32,
/// the init function
pub fn init() @This() {
return .{ .field1 = 10 };
}
};
}
```
The generated html documentation (with `zig build-lib -femit-docs demo.zig`) correctly contains the init function and the fields for Demo1 (function returning bare union) and Demo2 (tagged union).
But for Demo3 (function returning tagged union), it only contains the init function, the fields are missing.