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

Exo classes need to handle non-enumerable raw methods correctly. #1817

Closed
erights opened this issue Oct 9, 2023 · 0 comments · Fixed by #1809
Closed

Exo classes need to handle non-enumerable raw methods correctly. #1817

erights opened this issue Oct 9, 2023 · 0 comments · Fixed by #1809
Assignees
Labels
bug Something isn't working

Comments

@erights
Copy link
Contributor

erights commented Oct 9, 2023

Currently, the exo class creation functions fail to handle non-enumerable raw methods correctly.

At

const { constructor: _, ...methods } = behaviorMethods;

the code uses ... destructuring to take apart a collection of raw methods. But ... destructuring only gathers enumerable own methods.

At

...behaviorMethods,

the code uses ... to add the raw methods into a larger collection of methods. But ... only extracts enumerable own methods.

So far, all raw methods arguments to the exo makers formed the collection of raw methods using an object literal, so all the methods were enumerable-own anyway. However, this code is intended to support use of a JavaScript class' .prototype as a collection of raw methods. These two flaws prevent that.

@erights erights self-assigned this Oct 9, 2023
@erights erights added the bug Something isn't working label Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant