examples.reify: add default value field

This commit is contained in:
2023-11-23 17:56:20 -08:00
parent 2208079355
commit bd0d74ee6a

View File

@@ -21,6 +21,7 @@ const Example = struct {
again: ?bool, again: ?bool,
array: [5]i16, array: [5]i16,
nested: [3]struct { index: usize, title: []const u8 }, nested: [3]struct { index: usize, title: []const u8 },
default: u64 = 0xDEADCAFE,
}; };
const source = const source =
@@ -98,5 +99,6 @@ pub fn main() !void {
std.debug.print(" {{ index: {d}, title: {s} }}\n", .{ item.index, item.title }); std.debug.print(" {{ index: {d}, title: {s} }}\n", .{ item.index, item.title });
} }
std.debug.print(" ]\n", .{}); std.debug.print(" ]\n", .{});
std.debug.print(" default: 0x{X}\n", .{loaded.value.default});
std.debug.print("}}\n", .{}); std.debug.print("}}\n", .{});
} }