Skip to content

Resolve merged TypeScript classes in hierarchy and class coverage - #517

Merged
CaelmBleidd merged 2 commits into
mainfrom
caelmbleidd/ts-declaration-merging-hierarchy
Oct 15, 2026
Merged

CaelmBleidd merged 2 commits into
mainfrom
caelmbleidd/ts-declaration-merging-hierarchy

Conversation

@CaelmBleidd

@CaelmBleidd CaelmBleidd commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Valid TypeScript class/interface declaration merging produces two EtsIR declarations with the same signature. The hierarchy's single() lookup treated them as duplicate runtime classes and aborted initial-state construction before any class statement ran. Original Replacer and HashTable sources exposed this failure in the fixed 200-class startup smoke.

Resolve a same-signature group to its unique CLASS only when every other declaration is an INTERFACE augmentation. Reuse that canonical declaration selection for explicit CLASS-zone coverage targets, which otherwise rejected the same valid merged group after initial-state creation. Keep the complete scene and interface metadata and track the runtime class's full methods. Other ambiguous groups, including two runtime classes, retain the existing failure behavior; missing/foreign target identities still fail exact signature checks.

Validation: the original ten focused hierarchy/type/field checks pass. The follow-up passes all sixteen merging/class-coverage checks (four merging checks and twelve existing class-coverage checks), including an explicit target signature on the real source fixture. Restoring the original hierarchy lookup makes the source regression fail with List has more than one element; restoring only the old CLASS target lookup makes the new test fail with Class coverage targets must identify one scene class each, matching the two original Replacer startup receipts. Both changes are restored and the focused checks rerun successfully. Strict usvm-ts main/test Detekt reports zero findings. Full suites are left to CI; the real-corpus subset is rechecked in the integrated runtime.

@CaelmBleidd CaelmBleidd changed the title Resolve merged TypeScript declarations to their unique runtime class Resolve merged TypeScript classes in hierarchy and class coverage Oct 15, 2026
@CaelmBleidd
CaelmBleidd force-pushed the caelmbleidd/ts-declaration-merging-hierarchy branch from 1528406 to 3a77b2e Compare October 15, 2026 13:00
@CaelmBleidd
CaelmBleidd merged commit 68f49fc into main Oct 15, 2026
7 checks passed
@CaelmBleidd
CaelmBleidd deleted the caelmbleidd/ts-declaration-merging-hierarchy branch October 15, 2026 13:07
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