--- source: crates/rome_formatter_test/src/snapshot_builder.rs info: test_file: js/bind-expressions/short_name_method.js --- # Input ```js class X { constructor() { this.shortMethod = ::this.shortMethod; } shortMethod() { return true; } } ``` # Prettier differences ```diff --- Prettier +++ Rome @@ -1,6 +1,7 @@ class X { constructor() { - this.shortMethod = ::this.shortMethod; + this.shortMethod = + ::this.shortMethod } shortMethod() { ``` # Output ```js class X { constructor() { this.shortMethod = ::this.shortMethod } shortMethod() { return true; } } ``` # Errors ``` short_name_method.js:3:24 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected an expression, or an assignment but instead found ':' 1 │ class X { 2 │ constructor() { > 3 │ this.shortMethod = ::this.shortMethod; │ ^ 4 │ } 5 │ i Expected an expression, or an assignment here 1 │ class X { 2 │ constructor() { > 3 │ this.shortMethod = ::this.shortMethod; │ ^ 4 │ } 5 │ ```