Skip to content

fixed the panic new Function(...) issue#4648

Closed
hriztam wants to merge 1 commit intoboa-dev:mainfrom
hriztam:Issue-4525
Closed

fixed the panic new Function(...) issue#4648
hriztam wants to merge 1 commit intoboa-dev:mainfrom
hriztam:Issue-4525

Conversation

@hriztam
Copy link

@hriztam hriztam commented Feb 21, 2026

This Pull Request fixes/closes #4525

It changes the following:

  • Adds root-aware scope index optimization support for function-like nodes, with a root-only force option.
  • Adds FunctionExpression::analyze_scope_with_options(..., force_function_scope: bool) and keeps analyze_scope as a backward-compatible default.
  • Updates dynamic Function constructor analysis to force root function-scope indexing so runtime env layout matches binding locators.
  • Adds regression tests for new Function(...) panic reproduction and nested lexical capture behavior.

@github-actions
Copy link

Test262 conformance changes

Test result main count PR count difference
Total 52,862 52,862 0
Passed 49,472 49,472 0
Ignored 2,249 2,249 0
Failed 1,141 1,141 0
Panics 0 0 0
Conformance 93.59% 93.59% 0.00%

@nekevss nekevss requested a review from a team February 24, 2026 02:32
@jedel1043
Copy link
Member

Already fixed by #4645.

@jedel1043 jedel1043 closed this Feb 25, 2026
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.

Panic with certain uses of new Function(...)

2 participants