Build the coverage result without a conditional spread over its tiers

The self-hosted compiler refuses a conditional spread of `tiers` over a
LowerResult that already declares the field, so assign it instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Malte Ubl
2026-10-18 11:45:52 -07:00
co-authored by Claude Opus 5.5
parent 577b0135a9
commit fa64c19fdc
@@ -1091,7 +1091,7 @@ export function lowerToIr(
// Unreached JS statements whose fences deferred to runtime count as
// failed statements in the remainder's stats, so their diagnostics must
// travel with them: a failed statement is never left unexplained.
return {
const covered: LowerResult = {
...result,
stats: { ...result.stats, statementsDynamic },
unreached: {
@@ -1099,8 +1099,9 @@ export function lowerToIr(
stats: rem.stats,
...(rem.runtimeFences.length > 0 ? { runtimeFences: rem.runtimeFences } : {}),
},
...(tiers !== undefined ? { tiers } : {}),
};
if (tiers !== undefined) covered.tiers = tiers;
return covered;
}
/** The native namespace type produced by a literal static import() of a