Closed Bug 853987 Opened 13 years ago Closed 10 years ago

Proxies need to understand that arrow functions and most native functions don't have [[Construct]]

Categories

(Core :: JavaScript Engine, defect)

Other Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 929467

People

(Reporter: jorendorff, Unassigned)

Details

load(libdir + "asserts.js"); var p = new Proxy(a => a + 1, {construct: x => { throw "FAIL!"; }}); assertThrowsInstanceOf(() => new p, TypeError); Spun off from bug 848197 comment 3 which explains a bit more.
Related: I filed a bug with TC39 about Function.prototype.bind. https://bugs.ecmascript.org/show_bug.cgi?id=1391 Note however that the test in comment 0 doesn't involve bound functions at all; there's clearly a bug regardless of what TC39 decides to do with bound functions.
Summary: Proxies can detect that arrow functions secretly are constructors → Proxies need to understand that arrow functions and most native functions don't have [[Construct]]
Assignee: general → nobody
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.