mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
Zcu: include named tests in resolved references
Oops, a little typo from yours truly! No test for this one, because we don't have any way of testing the reference trace.
This commit is contained in:
parent
9c857bb32d
commit
27f3e8b61d
1 changed files with 9 additions and 4 deletions
13
src/Zcu.zig
13
src/Zcu.zig
|
|
@ -3872,9 +3872,11 @@ fn resolveReferencesInner(zcu: *Zcu) !std.AutoHashMapUnmanaged(AnalUnit, ?Resolv
|
||||||
.unnamed_test => true,
|
.unnamed_test => true,
|
||||||
.@"test", .decltest => a: {
|
.@"test", .decltest => a: {
|
||||||
const fqn_slice = nav.fqn.toSlice(ip);
|
const fqn_slice = nav.fqn.toSlice(ip);
|
||||||
for (comp.test_filters) |test_filter| {
|
if (comp.test_filters.len > 0) {
|
||||||
if (std.mem.indexOf(u8, fqn_slice, test_filter) != null) break;
|
for (comp.test_filters) |test_filter| {
|
||||||
} else break :a false;
|
if (std.mem.indexOf(u8, fqn_slice, test_filter) != null) break;
|
||||||
|
} else break :a false;
|
||||||
|
}
|
||||||
break :a true;
|
break :a true;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
@ -3884,7 +3886,10 @@ fn resolveReferencesInner(zcu: *Zcu) !std.AutoHashMapUnmanaged(AnalUnit, ?Resolv
|
||||||
@intFromEnum(inst_info.inst),
|
@intFromEnum(inst_info.inst),
|
||||||
});
|
});
|
||||||
try unit_queue.put(gpa, .wrap(.{ .nav_val = nav_id }), referencer);
|
try unit_queue.put(gpa, .wrap(.{ .nav_val = nav_id }), referencer);
|
||||||
try unit_queue.put(gpa, .wrap(.{ .func = nav.status.fully_resolved.val }), referencer);
|
// Non-fatal AstGen errors could mean this test decl failed
|
||||||
|
if (nav.status == .fully_resolved) {
|
||||||
|
try unit_queue.put(gpa, .wrap(.{ .func = nav.status.fully_resolved.val }), referencer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (zcu.namespacePtr(ns).pub_decls.keys()) |nav| {
|
for (zcu.namespacePtr(ns).pub_decls.keys()) |nav| {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue