Skip to content

[TS] Integrate computed class members with distinct symbol identity - #578

Open
CaelmBleidd wants to merge 3 commits into
mainfrom
caelmbleidd/ts-computed-member-identity
Open

CaelmBleidd wants to merge 3 commits into
mainfrom
caelmbleidd/ts-computed-member-identity

Conversation

@CaelmBleidd

@CaelmBleidd CaelmBleidd commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Updating the frontend for literal computed class members would make existing name-only lookups conflate [Symbol.iterator] with the ordinary string "Symbol.iterator". Member lookup, overload resolution, field metadata, property presence, and test-value reconstruction now respect the optional symbol marker. Unimplemented symbol field storage and method dispatch retain explicit unsupported outcomes before ordinary string storage or fallback dispatch can be selected.

The JacoDB pin is the publicly published immutable snapshot 0fac32c8c5 (UnitTestBot/jacodb#448; exact commit 0fac32c8c511c6228c3d6897262dc0924635af44). Existing instance-call capture also retains the normalized string key for computed calls whose frontend signature is %call; receiver['Symbol.iterator']() selects the real string member even when the class also declares the symbol method.

Validation:

  • Full :usvm-ts:test: 1781 tests, 0 failures, 0 errors, 139 skipped; detektMain, detektTest, and git diff --check passed.
  • Source-level symbolic tests plus native TypeScript replay cover plain/literal/iterator Counter classes, ordinary and literal-static calls, string/symbol collision, unsupported symbol-field initialization, and shadowed/dynamic keys. Narrow resolver tests cover exact/inferred/fallback field ownership and inherited string lookup.
  • Temporarily removing the method marker filter makes the string-member regression fail its result invariant; the filter was restored.
  • Original frozen SegmentTree source: SegmentTree.sum([1,2]).query(0,1) enters construction and query, returns one symbolic result 3, matching native execution, with no unsupported paths.
  • Original frozen Matrix source: construction/get/isValidIndex now execute, but new Matrix([[1,2],[3,4]]).get(1,0) returns symbolic undefined versus native 3. Missing class-getter invocation is recorded separately in [TS] Invoke declared class getters during property reads #577. Both original source hashes remain unchanged.

Computed access through a class constructor function object still has its existing explicit unsupported boundary. General Symbol runtime remains in #439. This change does not establish whole-class coverage improvement or support for every method in those classes.

Closes #575.

CI follow-up: the boxed registry fixture now exercises unchanged conditional source through separate ConstantDomain(true/false) requests, preserving all three scenarios and every native/prototype assertion. This is the standalone test-contract change in #582; no production selector or budget changed. The earlier missing-false CI outcome also occurred on the old frontend pin, while unchanged local controls passed. Its exact interleaving/root cause has not been reproduced.

A second existing test-contract issue is isolated in #593: the unconstrained TypeCoercion smoke had no assertions and failed string-witness extraction on both the new head and clean old-pin main. It now calls the unchanged untyped function through numeric/Boolean wrappers, requires all reachable results, and checks concrete coercion/native controls. General unrefined-any string witness support remains open in #592. The bounded TypeCoercion class passes 7 tests with its 2 pre-existing disabled tests; DetektTest passes.

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.

[TS] Integrate computed class members without mixing symbol and string keys

1 participant