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

a7ul picture a7ul  路  3Comments

evanplaice picture evanplaice  路  3Comments

elektronik2k5 picture elektronik2k5  路  3Comments

OneOfOne picture OneOfOne  路  3Comments

ojanvafai picture ojanvafai  路  3Comments