You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9a24005
Browse filesBrowse the repository at this point in the historyBrowse files
fix(census): record an object-literal method under its literal, not its block
`ts.isMethodDeclaration` is true of `const o = { getEngine() {…} }` as well as
of a class method, and an object literal opens no scope under
`opensCallableScope` -- so such a method was recorded as a lexical callable of
the enclosing BLOCK, and a bare `getEngine()` written in that block resolved to
the object's method. The language never does that: a name declared only that
way is `TS2304: Cannot find name`.
Measured at the previous head: a file-level `function getEngine(): IProbeEngine`
beside a block-local object literal declaring `getEngine(): Map<string, number>`
answered `other/platform-type` for a bare `getEngine().insert(…)` in that block,
in BOTH declaration orders, while `origin/main` answered the engine in one of
them and `tsc --noEmit --strict` answers the engine in both. That is a real
engine write subtracted under the DEFENDED `platform-type` arm, which prints
nothing and is counted nowhere -- the direction this census's header names as
the one it cannot survive.
`opensCallableScope` now also opens an object literal, so a member name is
recorded under ITS CONTAINER exactly as a class method's is. No lookup chain
walks a container (`calleeScopeChain` reaches the class for `this.m()` and
nothing for the rest), so the method stays reachable through the file-wide
FLOOR exactly as before and no receiver that resolved stops resolving.
Pinned in both declaration orders; the docblocks and the self-test success line
no longer claim a property the shape falsified.
Claude-Session: https://claude.ai/code/session_013RDBh5DqXd2xnLwvHLgLFr
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments