mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
std.testing.refAllDecls: force decl to be analyzed with just @field
Co-authored-by: Veikka Tuominen <git@vexu.eu>
This commit is contained in:
parent
2c24bf2f79
commit
dee96e2e2f
@ -466,8 +466,6 @@ test {
|
||||
pub fn refAllDecls(comptime T: type) void {
|
||||
if (!builtin.is_test) return;
|
||||
inline for (comptime std.meta.declarations(T)) |decl| {
|
||||
if (decl.is_pub and @typeInfo(@TypeOf(@field(T, decl.name))) == .Struct)
|
||||
_ = @hasDecl(@field(T, decl.name), "foo");
|
||||
_ = decl;
|
||||
if (decl.is_pub) _ = @field(T, decl.name);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user