New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create proxy for class constructor #312

Closed
raulsebastianmihaila opened this Issue Jan 22, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@raulsebastianmihaila

raulsebastianmihaila commented Jan 22, 2016

ProxyCreate (http://www.ecma-international.org/ecma-262/6.0/#sec-proxycreate) doesn't set the [[Construct]] method if the target isn't callable (doesn't have [[Call]]). AFAIK, class constructors don't have [[Call]]. Is this a bug?

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb
Member

ljharb commented Jan 22, 2016

Class constructors do have [[Call]], it's just specified to throw a TypeError. See http://tc39.github.io/ecma262/#sec-makeclassconstructor, and step 2 of http://tc39.github.io/ecma262/#sec-ecmascript-function-objects-call-thisargument-argumentslist.

@raulsebastianmihaila

This comment has been minimized.

Show comment
Hide comment
@raulsebastianmihaila

raulsebastianmihaila commented Jan 22, 2016

I see, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment