--- source: crates/rome_formatter_test/src/snapshot_builder.rs info: test_file: js/destructuring-private-fields/valid-multiple-bindings.js --- # Input ```js class C { #x = 1; m() { const {#x: x1, #x: x2 = x1 } = this; } } ``` # Prettier differences ```diff --- Prettier +++ Rome @@ -1,6 +1,6 @@ class C { #x = 1; m() { - const { #x: x1, #x: x2 = x1 } = this; + const {#x: x1, #x: x2 = x1 } = this; } } ``` # Output ```js class C { #x = 1; m() { const {#x: x1, #x: x2 = x1 } = this; } } ``` # Errors ``` valid-multiple-bindings.js:4:12 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected an identifier, a member name, or a rest pattern but instead found '#x: x1' 2 │ #x = 1; 3 │ m() { > 4 │ const {#x: x1, #x: x2 = x1 } = this; │ ^^^^^^ 5 │ } 6 │ } i Expected an identifier, a member name, or a rest pattern here 2 │ #x = 1; 3 │ m() { > 4 │ const {#x: x1, #x: x2 = x1 } = this; │ ^^^^^^ 5 │ } 6 │ } valid-multiple-bindings.js:4:20 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected an identifier, a member name, or a rest pattern but instead found '#x: x2' 2 │ #x = 1; 3 │ m() { > 4 │ const {#x: x1, #x: x2 = x1 } = this; │ ^^^^^^ 5 │ } 6 │ } i Expected an identifier, a member name, or a rest pattern here 2 │ #x = 1; 3 │ m() { > 4 │ const {#x: x1, #x: x2 = x1 } = this; │ ^^^^^^ 5 │ } 6 │ } valid-multiple-bindings.js:4:27 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `,` but instead found `=` 2 │ #x = 1; 3 │ m() { > 4 │ const {#x: x1, #x: x2 = x1 } = this; │ ^ 5 │ } 6 │ } i Remove = ```