696_modtype_leaf_collision.c -> r696_modtype_leaf_pos (run-exit 26),
r696_modtype_leaf_neg (staged error; w6c 'no field', w6c_ww
asserttyped: dot — the old no-wwstage-checkfile comment is stale)
697_samemod_prefer.c -> r697_samemod_prefer (compile)
699_use_promote_alias.c -> r699_usepromote_{type,fn,def,var}
(run-exit 42 each)
Single-file multi-package form folds the modcollision/samemodprefer/
usepromote data trees into the fixtures; the trees retire with their
carriers. The dir-tree .wwi transport of colliding type decls is owned
by test/byteid/wwi_test.ww. Coverage upgrades: 697 and the 699 rows
gain the wwstage leg the carriers gated or skipped, and all positive
rows enter the blanket test-data-byteid net.
23 lines
490 B
Plaintext
23 lines
490 B
Plaintext
//ww:compile
|
|
// migrated from test/wcc/697_samemod_prefer.c: bare-leaf `read` binds same-module first; compile-only (unmangled TEXT read labels still collapse in the linker).
|
|
package mod1;
|
|
export fn read(x: i32) i32 = {
|
|
return x + 100i32;
|
|
};
|
|
export fn caller() i32 = {
|
|
return read(1i32);
|
|
};
|
|
package mod2;
|
|
export fn read(x: str) i32 = {
|
|
return x.len + 200i32;
|
|
};
|
|
export fn caller() i32 = {
|
|
return read("ok");
|
|
};
|
|
package main;
|
|
import mod1;
|
|
import mod2;
|
|
fn main() i32 = {
|
|
return 0i32;
|
|
};
|