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

[Bug] Invalid operator precedence priority #49

Closed
maltsev opened this issue Mar 30, 2020 · 1 comment
Closed

[Bug] Invalid operator precedence priority #49

maltsev opened this issue Mar 30, 2020 · 1 comment

Comments

@maltsev
Copy link

maltsev commented Mar 30, 2020

The following code

function foob(a) {
    return (a || 'one') + 'two';
}

gets translated to

function foob(a) {
    return a || "onetwo";
}

I've tested it with esbuild built from the sources from the master branch.

@evanw
Copy link
Owner

evanw commented Mar 31, 2020

Oh crap, that's not good. There's a check missing in my constant folding logic. Thanks for the report! Will fix.

@evanw evanw closed this as completed in a108a08 Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants