wip(resolver): collectors + unified predicate + tightened adapters [stdlib B, BLOCKED on 0106]

Collectors (resolver.zig: collectVisibleAuthors/collectNamespaceAuthors + AuthorSet
+ VisibilityMode, 4 unit tests) + unified visibility predicate + isNameVisible/
isCImportVisible adapters routed to flat modes. Tightening surfaces issue 0106
(stdlib comptime expansion relies on the over-permissive import_graph join), so
run_examples is 467/471 here. attempt-2 folds in the coupled comptime-context fix.
This commit is contained in:
agra
2026-06-07 04:52:56 +03:00
parent 35457cb614
commit 7158337c73
6 changed files with 668 additions and 35 deletions

View File

@@ -509,8 +509,9 @@ pub const NamespaceEdges = std.StringHashMap(std.StringHashMap(NamespaceTarget))
/// The `RawDeclRef` a top-level node carries, or null when the node is not a
/// selectable named declaration (e.g. `impl_block`, `var_decl`, `ufcs_alias`,
/// a flat `c_import_decl`).
fn rawDeclRefOf(decl: *const Node) ?RawDeclRef {
/// a flat `c_import_decl`). Public so the unified resolver's namespace collector
/// can classify a `NamespaceTarget.own_decls` node without re-deriving the map.
pub fn rawDeclRefOf(decl: *const Node) ?RawDeclRef {
return switch (decl.data) {
.fn_decl => |*d| .{ .fn_decl = d },
.const_decl => |*d| .{ .const_decl = d },