Skip to content
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
Closed

Cannot create proxy for class constructor #312

raulsebastianmihaila opened this issue Jan 22, 2016 · 2 comments

Comments

@raulsebastianmihaila
Copy link

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
Copy link
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
Copy link
Author

I see, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants