Fix spread/rest emit for symbols.

It used the index of the symbol property as the name, not the symbol
itself.
This commit is contained in:
Nathan Shively-Sanders 2016-11-15 11:31:21 -08:00
parent c011b36d2e
commit bb46e789d5

View File

@ -39,8 +39,8 @@ var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
if (typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, s = Object.getOwnPropertySymbols(s); i < s.length; i++)
t[i] = s[i];
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
t[p[i]] = s[p[i]];
}
return t;
};`;
@ -51,8 +51,8 @@ var __rest = (this && this.__rest) || function (s, e) {
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, s = Object.getOwnPropertySymbols(s); i < s.length; i++) if (e.indexOf(s[i]) > 0)
t[i] = s[i];
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
t[p[i]] = s[p[i]];
return t;
};`;