-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 rest doesn't call Get() #5095
Comments
I just checked the transpiled code of the repl in node 6 and was not able to reproduce. The Error was thrown as expected. Though it seems the repl is somehow misbehaving here and not evaluating the code correctly. @gsathya Can you confirm this? |
Oh I found the issue, it seems the repl is catching the Error and printing it. But as in the example the Error has no msg nothing is printed. |
babel/packages/babel-helpers/src/helpers.js Lines 430 to 440 in 672adba
|
I think it does. var x = {
get a() { return 1; },
};
(() => { var { ...y} = x; console.log(y); })(); This code is printing Object {
"a": 1
} And I'm not sure about the specs, but that seems okay, unless the whole getter should be copied over. |
If i'm not wrong this is calling the getter. I wasn't able to reproduce this as well. |
The getter should not be copied over. |
Input Code
REPL
Babel Configuration (.babelrc, package.json, cli command)
Presets - ES6- stage3
Expected Behavior
Current Behavior
No error
Possible Solution
_objectWithoutProperties does not do
? Get(from, nextKey)
The text was updated successfully, but these errors were encountered: