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

evanw picture evanw  路  15Comments

eigilsagafos picture eigilsagafos  路  15Comments

hxhieu picture hxhieu  路  9Comments

ngbinh picture ngbinh  路  15Comments

rizkyramadhan picture rizkyramadhan  路  11Comments