mirror of https://github.com/tc39/test262.git
arguments object, non-strict immutable name binding fixup (#1278)
This commit is contained in:
parent
5d4c667b27
commit
9e3ff9a232
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: >
|
||||
The activation object is initialised with a property with name arguments
|
||||
and attributes {DontDelete}
|
||||
es5id: 10.1.6_A1_T3
|
||||
description: Checking function which returns "this"
|
||||
flags: [noStrict]
|
||||
---*/
|
||||
|
||||
function f1() {
|
||||
if (delete arguments) {
|
||||
$ERROR("#1: Function parameters have attribute {DontDelete}" + arguments);
|
||||
}
|
||||
return arguments;
|
||||
}
|
||||
|
||||
f1();
|
|
@ -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();
|
Loading…
Reference in New Issue