Files
Zachary D. Rowitsch 2240f6c518 Expand Test262 coverage to 550 tests (Phase B)
Vendor 500 new real Test262 tests (total 550), relax curation filters for
now-supported features (arrow functions, classes, destructuring, spread/rest,
for-in/of, template literals, let/const, instanceof), add automated triage
script, and track pass rate as a CI metric. 190/550 pass (34.5%).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:20:22 -05:00

29 lines
873 B
JavaScript

// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-function-definitions-runtime-semantics-evaluation
description: Removal of variable environment for the BindingIdentifier
info: |
[...]
2. Let scope be the running execution context's LexicalEnvironment.
3. Let funcEnv be NewDeclarativeEnvironment(scope).
4. Let envRec be funcEnv's EnvironmentRecord.
5. Let name be StringValue of BindingIdentifier.
6. Perform envRec.CreateImmutableBinding(name, false).
7. Let closure be FunctionCreate(Normal, FormalParameters, FunctionBody,
funcEnv, strict).
[...]
---*/
var probe;
var func = function f() {
probe = function() { return f; };
};
var f = 'outside';
func();
assert.sameValue(f, 'outside');
assert.sameValue(probe(), func);