Skip to content

[DEGRADE] Object.assign polyfill isn't injected by ES2018 object rest props #3139

Closed
@teppeis

Description

@teppeis

Input:

module.exports = () => {
  var {a, ...rest} = {a: 1, b: 2, c: 3};
  return a === 1 && rest.a === undefined && rest.b === 2 && rest.c === 3;
};

v20181008 injects Object.assign polyfill expectdly: output

v20181028 doesn't: output

In result, the compiled code throws TypeError: Object function Object() { [native code] } has no method 'assign'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2internal-issue-createdAn internal Google issue has been created to track this GitHub issuetriage-doneHas been reviewed by someone on triage rotation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions