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