Closed agilesteel closed 1 month ago
version = "3.8.3" maxColumn = 100 rewrite.rules = [ RedundantParens ] runner.dialect = scala213
Given code like this:
object a { val b: Long = 1 } (-a.b).toString
Scalafmt formats code like this:
-a.b.toString
Parens are removed and the code doesn't compile with
value unary_- is not a member of String
I would like the formatted output to look like this:
(-a.b).toString // untouched
Revert to v3.8.2 or disable formatting.
v3.8.2
This also happens in Scala3.
duplicate of #4116.
Steps
Given code like this:
Problem
Scalafmt formats code like this:
Parens are removed and the code doesn't compile with
Expectation
I would like the formatted output to look like this:
Workaround
Revert to
v3.8.2
or disable formatting.Note
This also happens in Scala3.