Esbuild: [Bug] Invalid operator precedence priority

Created on 30 Mar 2020  路  1Comment  路  Source: evanw/esbuild

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.

Most helpful comment

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

>All comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lolychee picture lolychee  路  4Comments

wcastand picture wcastand  路  4Comments

fannheyward picture fannheyward  路  4Comments

qnp picture qnp  路  4Comments

iamakulov picture iamakulov  路  4Comments