Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Proxy/create-target-is-not-callable.js

raw
1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 es6id: 9.5.15
5 description: >
6 A Proxy exotic object is only callable if the given target is callable.
7 info: |
8 Proxy ( target, handler )
9
10 7. If IsCallable(target) is true, then
11 a. Set the [[Call]] internal method of P as specified in 9.5.13.
12 ...
13
14
15 12.3.4.3 Runtime Semantics: EvaluateDirectCall( func, thisValue, arguments,
16 tailPosition )
17
18 4. If IsCallable(func) is false, throw a TypeError exception.
19 ---*/
20
21 var p = new Proxy({}, {});
22
23 assert.throws(TypeError, function() {
24 p.call();
25 });