-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Object extension literal #2177
Object extension literal #2177
Conversation
…ll helps to overwrite such properties
So this doesn't appear to actually implement object extension literals, but some edit: just read through the object extension literal proposal again, and apparently it does work through mutation |
I see the difference only in syntax: .= instead of .{ or I'm wrong? I'll add tests tomorrow. |
No, you're right. It was my mistake. See my edit above. |
The branch you're trying to merge appears to have two unrelated changes: The Also, no test cases? |
I removed unrelated changes and added test. |
What's with the scope check? Shouldn't |
It will extend variable if it exist in parent scope and throw error if variable wasn't defined. |
Hmm, well it is consistent with the new strict error on |
@itrelease: @TrevorBurnham is trying to make the point that we should be able to use this operator on externally-defined variables -- things that are in scope, but which CoffeeScript doesn't know about. This can be any property added to the global object (or anywhere up its prototype chain), since the global object is also the root of the scope chain. edit: @TrevorBurnham: I don't believe it is. Since it doesn't introduce a variable into scope, it should behave more like |
Oh I see, so we should just rely on thing that variable might be in scope and not throwing error? |
…en running -c -m.
Hi! Thanks for reviving the source map st
fixes -c and -o for sourcemaps
#2176 and #1632