Skip to content

Compressed output resuts in ReferenceError: argument_1 is not defined #709

Open

Description

@ziadkh0

Bug report

Version terser 4.6.13

On try.terser.org

Options

{
  compress: {
    arguments: true,
    keep_fargs: false,
  },
}

terser input

a(function (b) {
b.c = c;
function c() {
  return arguments[1];
}
});

terser output or error

a((function(n){n.c=function(){return argument_1}}));

Which gives a ReferenceError: argument_1 is not defined

Expected result

Valid code, something like

a((function(n){n.c=function(){return arguments[1]}}));

Edit 1

Better expected result

Something like

a((function(n){n.c=function(x,y){return y}}));

Activity

  1. fabiosantoscode commented on May 26, 2020

    @fabiosantoscode
    Collaborator

    Cool combination of options you found there :)

  2. ziadkh0 commented on May 27, 2020

    @ziadkh0
    ContributorAuthor

    I feel this might be related to #715

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions