Closed
Description
Original source code:
if (2 ** 3 > 0) { alert('test'); }
Expected transpiled code:
0 < Math.pow(2, 3) && alert("test");
0 < 2 ** 3 && alert("test");
Same result in ternary operator.
Also, it throws an error in Advanced Optimization.
JSC_INTERNAL_ERROR_UNEXPECTED_TOKEN: Internal Error: TypeCheck doesn't know how to handle EXPONENT at line 1 character 4
if (2 ** 3 > 0) { alert('test'); }
^
If another exponential operator is in body, they are transpiled.
Original:
if (2 ** 3 > 0) { alert(2 ** 3); }
Transpiled:
0 < Math.pow(2, 3) && alert(Math.pow(2, 3));
Metadata
Metadata
Assignees
Labels
No labels