test(union): regression cases + kernel-parity torture coverage

Four cases in extraction.test.ts: a Rust union carrying an
`impl Trait for` edge and owning the impl's method; a named C union
alongside a forward declaration that must NOT mint a node; a
`typedef union` taking the typedef name with no `<anonymous>` twin; a
C++ union with a member function.

Verified they fail without the fix on BOTH extraction paths — the wasm
walker via CODEGRAPH_KERNEL=0 and the kernel with a staged build.

torture.c / torture.rs gain the same shapes. The parity gate compares
the two walkers rather than a snapshot, so the fixtures do not detect
the bug on their own — they pin that the fix stays SYMMETRIC. The
regression tests above are what pin that it is present.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
ctype_lab
2026-08-06 15:47:09 +09:00
co-authored by Claude Opus 5
parent 85e9ac6762
commit 11acc504b5
3 changed files with 133 additions and 0 deletions
@@ -209,3 +209,10 @@ fn mount() {
}
routes![top_level_h];
pub union Reg {
pub raw: u32,
pub halves: [u16; 2],
}
impl Base for Reg {}