Skip to content
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

Sequence ignored when it used in extends of unused class #430

Closed
L2jLiga opened this issue Aug 18, 2019 · 6 comments
Closed

Sequence ignored when it used in extends of unused class #430

L2jLiga opened this issue Aug 18, 2019 · 6 comments

Comments

@L2jLiga
Copy link
Contributor

L2jLiga commented Aug 18, 2019

Bug report or Feature request?

Bug

Version (complete output of terser -V or specific git commit)

latest master

Complete CLI command or minify() options used

npx terser issue.js -c --toplevel

terser input

let x = "FAIL";
class A extends(x = "PASS", Object){}
console.log(x); // PASS

terser output or error

let x = "FAIL";
console.log(x); // FAIL

Expected result

let x = "FAIL";
x = "PASS";
console.log(x); // PASS

or

let x = "PASS";
console.log(x); // PASS

or

console.log("PASS"); // PASS
@L2jLiga L2jLiga changed the title Sequence ignored when it used in class extend Sequence ignored when it used in extends of unused class Aug 18, 2019
@fabiosantoscode
Copy link
Collaborator

Interesting corner case. Maybe this is a more general problem. Can you find more instances of sequences being ignored? Maybe sequences within AST_Export or AST_DefaultAssign?

@fabiosantoscode
Copy link
Collaborator

Maybe inside AST_Expansion too

@L2jLiga
Copy link
Contributor Author

L2jLiga commented Aug 18, 2019

I'll try my best

@fabiosantoscode
Copy link
Collaborator

Just closed it @L2jLiga :)

@L2jLiga
Copy link
Contributor Author

L2jLiga commented Sep 24, 2019

@fabiosantoscode very nice fix! But I see couple of todos 😉

@fabiosantoscode
Copy link
Collaborator

I probably forgot them there lol

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

No branches or pull requests

2 participants