ww: classify imported call returns canonically

This commit is contained in:
2026-08-14 11:14:52 +09:00
parent 10e02a00ee
commit 72e890d5aa
2 changed files with 22 additions and 11 deletions

View File

@@ -224,10 +224,16 @@ fn m2positive(pkg: str) void = {
fail("qualified", "cs.wwi != ww.wwi");
};
let body: str = testenv.readfile(cs);
if (!testenv.has(body, "export fn use(x: dep.Clash) i32;")) {
fail("qualified", ".wwi dropped the qualified signature");
if (!testenv.has(body, "import __wwi_612e646570 a.dep;\n")
|| !testenv.has(body,
"export fn use(x: __wwi_612e646570.Clash) i32;")) {
fail("qualified", ".wwi did not canonicalize the qualified signature");
};
if (!testenv.has(body, "//ww:module a.dep\n")
if (testenv.has(body, "export fn use(x: dep.Clash) i32;")) {
fail("qualified", ".wwi retained the source-file qualifier");
};
if (!testenv.has(body,
"//ww:module a.dep\npackage __wwi_612e646570;\n")
|| !testenv.has(body, "export type Clash = struct { x: i32 };")) {
fail("qualified", ".wwi omitted the signature's origin-owned type fact");
};