| 1 |
// This file was procedurally generated from the following sources: |
| 2 |
// - src/spread/obj-override-immutable.case |
| 3 |
// - src/spread/default/call-expr.template |
| 4 |
/*--- |
| 5 |
description: Object Spread overriding immutable properties (CallExpression) |
| 6 |
esid: sec-function-calls-runtime-semantics-evaluation |
| 7 |
es6id: 12.3.4.1 |
| 8 |
features: [object-spread] |
| 9 |
flags: [generated] |
| 10 |
includes: [propertyHelper.js] |
| 11 |
info: | |
| 12 |
CallExpression : MemberExpression Arguments |
| 13 |
|
| 14 |
[...] |
| 15 |
9. Return EvaluateDirectCall(func, thisValue, Arguments, tailCall). |
| 16 |
|
| 17 |
12.3.4.3 Runtime Semantics: EvaluateDirectCall |
| 18 |
|
| 19 |
1. Let argList be ArgumentListEvaluation(arguments). |
| 20 |
[...] |
| 21 |
6. Let result be Call(func, thisValue, argList). |
| 22 |
[...] |
| 23 |
---*/ |
| 24 |
|
| 25 |
let o = {b: 2}; |
| 26 |
Object.defineProperty(o, "a", {value: 1, enumerable: true, writable: false, configurable: true}); |
| 27 |
|
| 28 |
|
| 29 |
var callCount = 0; |
| 30 |
|
| 31 |
(function(obj) { |
| 32 |
assert.sameValue(obj.a, 3) |
| 33 |
assert.sameValue(obj.b, 2); |
| 34 |
|
| 35 |
verifyProperty(obj, "a", { |
| 36 |
enumerable: true, |
| 37 |
writable: true, |
| 38 |
configurable: true, |
| 39 |
value: 3 |
| 40 |
}); |
| 41 |
|
| 42 |
verifyProperty(obj, "b", { |
| 43 |
enumerable: true, |
| 44 |
writable: true, |
| 45 |
configurable: true, |
| 46 |
value: 2 |
| 47 |
}); |
| 48 |
callCount += 1; |
| 49 |
}({...o, a: 3})); |
| 50 |
|
| 51 |
assert.sameValue(callCount, 1); |