From fa64c19fdc8a536867144474fcae3e7d22d3fb42 Mon Sep 17 00:00:00 2001 From: Malte Ubl Date: Sun, 18 Oct 2026 09:51:38 -0700 Subject: [PATCH] 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 --- packages/compiler/src/frontend/lowering/lowerer.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/compiler/src/frontend/lowering/lowerer.ts b/packages/compiler/src/frontend/lowering/lowerer.ts index c535d603f..d104eae39 100644 --- a/packages/compiler/src/frontend/lowering/lowerer.ts +++ b/packages/compiler/src/frontend/lowering/lowerer.ts @@ -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