Check for intended semantics

This commit is contained in:
André Bargull 2015-05-20 22:13:17 +02:00
parent ab6809cf47
commit eace19ef91

View File

@ -8,7 +8,6 @@ description: >
non-writable. Perform property attribute changes with two non-writable. Perform property attribute changes with two
[[DefineOwnProperty]] calls. Add intervening call to [[DefineOwnProperty]] calls. Add intervening call to
SetMutableBinding. SetMutableBinding.
Specification bug: https://bugs.ecmascript.org/show_bug.cgi?id=4371
flags: [noStrict] flags: [noStrict]
---*/ ---*/
@ -17,11 +16,13 @@ function argumentsNonConfigurableThenNonWritableWithInterveningSetMutableBinding
a = 2; a = 2;
Object.defineProperty(arguments, "0", {writable: false}); Object.defineProperty(arguments, "0", {writable: false});
assert.sameValue(a, 2); assert.sameValue(a, 2);
assert.sameValue(arguments[0], 1); // `arguments[0] === 1` per ES2015, Rev 38, April 14, 2015 Final Draft.
// Specification bug: https://bugs.ecmascript.org/show_bug.cgi?id=4371
assert.sameValue(arguments[0], 2);
// Postcondition: Arguments mapping is removed. // Postcondition: Arguments mapping is removed.
a = 3; a = 3;
assert.sameValue(a, 3); assert.sameValue(a, 3);
assert.sameValue(arguments[0], 1); assert.sameValue(arguments[0], 2);
} }
argumentsNonConfigurableThenNonWritableWithInterveningSetMutableBinding(1); argumentsNonConfigurableThenNonWritableWithInterveningSetMutableBinding(1);