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