Skip to content

[ETS] Keep lifted closures on runtime declarations after class merging - #444

Merged
CaelmBleidd merged 1 commit into
neofrom
caelmbleidd/runtime-closure-ownership
Oct 16, 2026
Merged

CaelmBleidd merged 1 commit into
neofrom
caelmbleidd/runtime-closure-ownership

Conversation

@CaelmBleidd

Copy link
Copy Markdown
Member

When an interface precedes its same-signature runtime class, lifted closures are attached to the interface. The runtime class then loses executable bodies, while signature-based method lookup can still execute them. This also makes a class IR coverage universe incomplete.

Skip type-only interface and structural declarations when indexing anonymous-method owners. Runtime classes, enums and namespace/default containers keep the existing signature identity and linear lookup.

Validation: TypeScript typecheck and 67 focused frontend tests passed (closures, classes, ambient namespaces). Four new cases cover both declaration orders, file and namespace scopes, nested lexical closures, and compact JSON round-trip. With the fix removed, both interface-first cases fail because the runtime owner has zero closures; with it restored all four pass.

The repository pre-commit license check is blocked by four existing unrelated Kotlin test files missing license headers; no Kotlin source was changed. A small USVM follow-up will reject raw IR hits outside its pre-frozen universe; its integration build needs this frontend commit. Related: UnitTestBot/usvm#489.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

  248 files  ±0    248 suites  ±0   14m 41s ⏱️ - 2m 1s
  900 tests ±0    888 ✅ ±0  12 💤 ±0  0 ❌ ±0 
2 170 runs  ±0  2 120 ✅ ±0  50 💤 ±0  0 ❌ ±0 

Results for commit c6d1fe3. ± Comparison against base commit 7db549e.

@CaelmBleidd
CaelmBleidd merged commit 1456b44 into neo Oct 16, 2026
8 checks passed
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