| 1 |
// Copyright (c) 2012 Ecma International. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
es5id: 15.2.3.7-6-a-314 |
| 6 |
description: > |
| 7 |
Object.defineProperties - 'O' is an Arguments object, 'name' is |
| 8 |
own property of [[ParameterMap]] of 'O', test 'name' is deleted if |
| 9 |
'name' is configurable and 'desc' is accessor descriptor (10.6 |
| 10 |
[[DefineOwnProperty]] step 5.a.i) |
| 11 |
---*/ |
| 12 |
|
| 13 |
var arg = (function() { |
| 14 |
return arguments; |
| 15 |
}(1, 2, 3)); |
| 16 |
var accessed = false; |
| 17 |
|
| 18 |
Object.defineProperties(arg, { |
| 19 |
"0": { |
| 20 |
get: function() { |
| 21 |
accessed = true; |
| 22 |
return 12; |
| 23 |
} |
| 24 |
} |
| 25 |
}); |
| 26 |
|
| 27 |
assert.sameValue(arg[0], 12, 'arg[0]'); |
| 28 |
assert(accessed, 'accessed !== true'); |