w6c+selfhost: cross-module same-leaf type disambiguation via Sym.mod
This commit is contained in:
12
test/wcc/data/modcollision/mod2/mod2.ww
Normal file
12
test/wcc/data/modcollision/mod2/mod2.ww
Normal 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,
|
||||
};
|
||||
Reference in New Issue
Block a user