-
Notifications
You must be signed in to change notification settings - Fork 464
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
arguments object, non-strict immutable name binding fixup (#1278)
- Loading branch information
Showing
2 changed files
with
21 additions
and
20 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
test/language/arguments-object/non-strict-arguments-object-is-immutable.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright 2017 Rick Waldron. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-functiondeclarationinstantiation | ||
description: Non-strict mode function execution context has a mutable "arguments" binding, however it is created with a "false" argument, which means it may not be deleted. | ||
info: | | ||
envRec.CreateMutableBinding("arguments", false). | ||
CreateMutableBinding(N, D) | ||
Create a new but uninitialized mutable binding in an Environment Record. The String value N is the text of the bound name. If the Boolean argument D is true the binding may be subsequently deleted. | ||
flags: [noStrict] | ||
---*/ | ||
|
||
function f1() { | ||
assert.sameValue(delete arguments, false); | ||
} | ||
|
||
f1(); |