--- source: crates/rome_formatter_test/src/snapshot_builder.rs info: test_file: js/arrows-bind/arrows-bind.js --- # Input ```js a => ({}::b()``[''].c++ && 0 ? 0 : 0); (a => b)::c; a::(b => c); ``` # Prettier differences ```diff --- Prettier +++ Rome @@ -1,3 +1,6 @@ -(a) => ({}::b()``[""].c++ && 0 ? 0 : 0); -((a) => b)::c; -a::((b) => c); +a => ({} +::b()``[''].c++ && 0 ? 0 : 0) +(a) => b; +::c +a: +:(b => c) ``` # Output ```js a => ({} ::b()``[''].c++ && 0 ? 0 : 0) (a) => b; ::c a: :(b => c) ``` # Errors ``` arrows-bind.js:1:9 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `)` but instead found `:` > 1 │ a => ({}::b()``[''].c++ && 0 ? 0 : 0); │ ^ 2 │ (a => b)::c; 3 │ a::(b => c); i Remove : arrows-bind.js:2:9 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected a semicolon or an implicit semicolon after a statement, but found none 1 │ a => ({}::b()``[''].c++ && 0 ? 0 : 0); > 2 │ (a => b)::c; │ ^ 3 │ a::(b => c); 4 │ i An explicit or implicit semicolon is expected here... 1 │ a => ({}::b()``[''].c++ && 0 ? 0 : 0); > 2 │ (a => b)::c; │ ^ 3 │ a::(b => c); 4 │ i ...Which is required to end this statement 1 │ a => ({}::b()``[''].c++ && 0 ? 0 : 0); > 2 │ (a => b)::c; │ ^^^^^^^^^ 3 │ a::(b => c); 4 │ arrows-bind.js:3:3 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected a statement but instead found ':' 1 │ a => ({}::b()``[''].c++ && 0 ? 0 : 0); 2 │ (a => b)::c; > 3 │ a::(b => c); │ ^ 4 │ i Expected a statement here 1 │ a => ({}::b()``[''].c++ && 0 ? 0 : 0); 2 │ (a => b)::c; > 3 │ a::(b => c); │ ^ 4 │ ```