1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 esid: sec-isconcatspreadable
6 Revoked proxy value produces a TypeError during access of
7 `Symbol.isConcatSpreadable` property
10 5. Repeat, while items is not empty
11 a. Remove the first element from items and let E be the value of the
13 b. Let spreadable be ? IsConcatSpreadable(E).
14 c. If spreadable is true, then
16 e. Else E is added as a single item rather than spread,
19 ES6 22.1.3.1.1: Runtime Semantics: IsConcatSpreadable ( O )
21 1. If Type(O) is not Object, return false.
22 2. Let spreadable be ? Get(O, @@isConcatSpreadable).
27 3. Return ? O.[[Get]](P, O).
32 2. Let handler be O.[[ProxyHandler]].
33 3. If handler is null, throw a TypeError exception.
37 var handle = Proxy.revocable([], {});
41 assert.throws(TypeError, function() {
42 [].concat(handle.proxy);
43 }, '[].concat(handle.proxy) throws a TypeError exception');