swc/ecmascript/transforms/optimization/tests/expr-simplifier/issue-2165/case1/output.js
강동윤 97514a7549
fix(es): Fix some easy bugs (#2166)
swc_ecma_parser:
 - Fix parsing of typescript generics in jsx context. (#2161)

swc_ecma_transforms_base:
 - `fixer`: Handle assignment with patterns in arrow body. (#2163)

swc_ecma_utils:
 - `as_bool`: Handle assignment with operator correctly. (#2165)
2021-08-27 06:03:06 +00:00

6 lines
98 B
JavaScript

var bit = 0;
var sum = 0;
sum += (bit ^= 1) ? 0 : 1;
sum += (bit ^= 1) ? 0 : 1;
console.log(sum);