mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-11 02:03:59 +08:00
`(x as T).m` where T's arms disagree about `m` — one declares it as a data field, another declares only a setter, or only a getter — fell back to the assertion's checked extraction, which traps on the arm with no data field. Node reads `undefined` from the setter-only arm (a read never invokes a setter) and the getter's result from the getter-only arm. Count an arm as declaring the member when it carries the data field or a getter, and let a setter-only arm answer its own read as undefined instead of bailing out. tests/corpus/8511-asserted-probe-setter-getter-arms.ts pins both shapes against Node. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>