mirror of
https://github.com/tc39/test262.git
synced 2025-07-25 15:04:43 +02:00
add Function.prototype.toString result for callable proxies
This commit is contained in:
parent
83ffb4bbf2
commit
7d5a5fef36
17
test/built-ins/Function/prototype/toString/proxy.js
vendored
Normal file
17
test/built-ins/Function/prototype/toString/proxy.js
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// Copyright (C) 2018 Michael Ficarra. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-function.prototype.tostring
|
||||||
|
description: Function.prototype.toString on a proxied function
|
||||||
|
info: |
|
||||||
|
Function.prototype.toString accepts any callable, including proxied
|
||||||
|
functions, and produces a NativeFunction
|
||||||
|
includes: [nativeFunctionMatcher.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
const f = new Proxy(function(){}, {});
|
||||||
|
assertNativeFunction(f);
|
||||||
|
|
||||||
|
const g = new Proxy(f, { apply() {} });
|
||||||
|
assertNativeFunction(g);
|
Loading…
x
Reference in New Issue
Block a user