class _Main {
static function fn(a : number) : void {
++a;
log a;
}
static function main(args : string[]) : void {
_Main.fn(1);
}
}
Failed to compile.
/path/JSX/node_modules/esprima/esprima.js:3872
throw e;
^
Error: Line 189: Invalid left-hand side in assignment
at throwError (/path/JSX/node_modules/esprima/esprima.js:1161:21)
at throwErrorTolerant (/path/JSX/node_modules/esprima/esprima.js:1172:24)
at parseUnaryExpression (/path/JSX/node_modules/esprima/esprima.js:1749:17)
at parseMultiplicativeExpression (/path/JSX/node_modules/esprima/esprima.js:1790:20)
at parseAdditiveExpression (/path/JSX/node_modules/esprima/esprima.js:1807:20)
at parseShiftExpression (/path/JSX/node_modules/esprima/esprima.js:1824:20)
at parseRelationalExpression (/path/JSX/node_modules/esprima/esprima.js:1845:16)
at parseEqualityExpression (/path/JSX/node_modules/esprima/esprima.js:1863:20)
at parseBitwiseANDExpression (/path/JSX/node_modules/esprima/esprima.js:1880:20)
at parseBitwiseXORExpression (/path/JSX/node_modules/esprima/esprima.js:1896:20)
Compile the code.
Failed to compile.
Optimized code is this.
I think this is optimizer bug.