Repository navigation
[ETS] Keep lifted closures on runtime declarations after class merging - #444
Merged
Merged
Conversation
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.