mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-03 07:54:40 +08:00
An unpinned generic declaration compared with `===`/`!==` takes its signature from the other operand (`held === ident`), which clears the pi `agent-session.ts:590` shape. That pin alone would answer `false` where JavaScript answers `true` when the program also holds the declaration at another signature, so a whole-program check refuses the comparison instead. It covers the direct form and values compared through `unknown` (the g5 silent divergence: two instances of one declaration compared unequal), resolving dynamic operands' provenance only when some declaration is held at more than one signature. - generic-functions: `identityComparisonPin` and `checkGenericIdentityPins` (runs once at the end of lowering, when every value instance is known); `GenericFnInfo.valueInstances` records the instances value references produced. - Corpus: `generic-identity-pin.ts`, `generic-identity-unknown.ts`. - Diagnostics: `generic-identity-multiple-pins.ts`, `generic-identity-unknown.ts`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>