w6c+selfhost: cross-module same-leaf type disambiguation via Sym.mod

This commit is contained in:
2026-05-15 10:26:20 +09:00
parent e349536f62
commit 66d6408cbe
15 changed files with 614 additions and 60 deletions

View File

@@ -0,0 +1,12 @@
// modcollision/mod2 — exports `type stream` with mod2-shaped fields.
// Paired with mod1/mod1.ww to exercise same-leaf-name cross-module
// type disambiguation. Test driver: 696_modtype_leaf_collision.c.
//
// Fields are intentionally named distinctly from mod1's (c/d vs a/b)
// so the negative test (`b: mod1.stream` accessed via mod2-only field
// 'c') surfaces as a compile-time field-resolution error.
export type stream = struct {
c: i32,
d: i32,
};