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

Fix for issue #1455 - Inherited Class generated code does not match order of execution #1533

Closed
wants to merge 2 commits into from

Conversation

alanning
Copy link

Fix for Issue #1455. When I first looked at the generated code from the Class example on the website, I couldn't figure out how it wasn't throwing an error. Explained why it works and how it can be confusing in the issue description.

Question: If the patch is accepted, will the class example be automatically updated once the project is rebuilt?

(It's my first time committing so I apologize if I did something incorrectly. I made changes in a local branch 'fix_1455', then merged with my master, then submitted a pull request as described in the git tutorial found here)

@michaelficarra michaelficarra mentioned this pull request Apr 8, 2012
@jashkenas
Copy link
Owner

I think that we actually want to leave the ordering as is ... just in case you do something tricky and immediately look for an inherited static property, within the constructor expression.

It looks backwards, but semantically, I think it makes sense to have the prototype chain be the very first thing that happens to a class, before the constructor body is even defined.

@jashkenas jashkenas closed this Apr 10, 2012
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

Successfully merging this pull request may close these issues.

2 participants