Skip to content

[TS] Support boxed numeric string indexes - #690

Open
CaelmBleidd wants to merge 1 commit into
caelmbleidd/ts-preserve-sparse-array-witnessesfrom
caelmbleidd/ts-boxed-string-indexing
Open

CaelmBleidd wants to merge 1 commit into
caelmbleidd/ts-preserve-sparse-array-witnessesfrom
caelmbleidd/ts-boxed-string-indexing

Conversation

@CaelmBleidd

Copy link
Copy Markdown
Member

Changes

  • Resolve boxed numeric property keys before reading a UTF-16 string index. Check the numeric kind on each path before using its payload.
  • Record a named runtime limitation on paths with an unsupported key. Preserve the fast path for unboxed numeric keys.

Verification

The new source regression previously failed with IllegalArgumentException: String indexing needs a numeric property key. It now replays generated numeric inputs in Node.js. A separate test checks that a nonnumeric path retains its unsupported outcome. All 23 targeted tests and both USVM TS Detekt tasks passed locally against #640.

This patch is the base for a separate change to reading .length on symbolic values reached through array-typed source expressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant