Parent #938; overall #66. On origin/main e2124de, a same-scope ambient class/namespace merge loses the namespace static value even though inherited constructor checking is correct. Minimal source: declare module "same-scope" { export namespace Api { export class Base { constructor(value: string); } export class Derived extends Base {} export namespace Derived { export const extra: 3; } } }. Consumer imports Api, constructs new Api.Derived("ok"), checks new Api.Derived(1), and reads Api.Derived.extra into literal types 3 and 4. Pinned TypeScript 5.9.3 emits TS2345 for the wrong constructor argument and one TS2322 for the wrong extra literal; Home emits the same TS2345 but two false TS2339 for both extra reads. Both runs were serial under HOME_RUN_MAX_MB=3840. This is distinct from the split/combined-fragment merged namespace tests that pass under #938 and from the source-owned inherited constructor fix e2124de. Acceptance: publish the exact same-scope class plus namespace value surface (including inherited classes) without a partial or any-typed route; retain wrong-type TS2322 and valid reads; cover direct Program, streaming/CLI, and declaration-order controls; compare code, message and location against TypeScript; run unfiltered checker/Program/driver/CLI/entrypoint gates. No fixture edits, diagnostic suppression, or special-case path behavior. Pinned Bun WebKit is absent locally; no Bun-native suite claim.
fix(ts): retain same-scope ambient class namespace static members
#942Pushed 0cb789b4c directly to origin/main as glennmichael123 (three files, conventional commit, no coauthors). The exact ambient-namespace collector now admits a single module fragment when it contains a same-scope class/namespace pair, and the unresolved-merge guard covers a single fragment too, so unsupported class schemas cannot publish a partial route. A red Program regression failed before the change (expected two diagnostics, found three); final Program tests cover direct and inherited class statics, valid reads, wrong-literal TS2322, wrong-constructor TS2345, and a negative unsupported setter pair that publishes no partial value. TypeScript 5.9.3 and rebuilt Home CLI match codes, messages and locations on three-error fixtures in both class-before-namespace and namespace-before-class declaration orders. Final guarded suites (serial, HOME_RUN_MAX_MB=3840): Program 388/388, entrypoint 66/66, ts_cli 89/89. Checker and driver gates are cached-green from their unchanged modules (previous fresh 4682/4682 and 222/222 respectively); no fresh-count claim for this commit. Targeted Pickier, Zig fmt and staged diff checks pass. Keep #942 OPEN until streaming publication and broader exact-merge acceptance are checked; #938 and #66 also remain open. Pinned Bun WebKit is absent locally, so no native Bun corpus claim.
Follow-up pushed directly to origin/main: 4c4e11de5 (four test files, conventional commit, glennmichael123 author/committer, no coauthors). The same-scope ambient class/namespace regression now covers two declaration orders in direct Program compilation and compileAllStreaming, with the streaming callback and final diagnostics each checked for the expected three errors. CLI-adapter coverage checks both declaration orders and both file-add orders. TypeScript 5.9.3 and rebuilt Home CLI already matched code, message, and location on the direct/inherited three-error fixture in both declaration orders after 0cb789b4c. Serial HOME_RUN_MAX_MB=3840 gates for this test-only follow-up: entrypoint 66/66 and ts_cli 89/89 ran fresh; Program, checker, and driver were invoked and passed through Zig cached results (previous fresh source-change runs: Program 388/388, checker 4682/4682, driver 222/222). Targeted Pickier, Zig fmt, and staged diff checks passed. #938 and #66 remain open for broader work. Pinned Bun WebKit is absent; no native Bun corpus parity claim.
Sign in to comment on this issue.