This is a mix of changes, most importantly: - Always print parens when mixing nullish coalescing and another logical - Fixes assignment in the callee of an optional chain, which now blocks #11248 Also, cleans up a bit of code, and removes an unnecessary parens around `class A extends new B {}`
18 lines
205 B
JavaScript
18 lines
205 B
JavaScript
const foo = 'test'
|
|
console.log((foo ?? '') == '')
|
|
|
|
|
|
a ?? (b ?? c);
|
|
(a ?? b) ?? c;
|
|
|
|
a ?? (b || c);
|
|
a || (b ?? c);
|
|
(a ?? b) || c;
|
|
(a || b) ?? c;
|
|
|
|
a ?? (b && c);
|
|
a && (b ?? c);
|
|
(a ?? b) && c;
|
|
(a && b) ?? c;
|
|
|