You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The formatted code no longer compiles because the next token after the colon in Unsafe.unsafe: needs to be either a newline/significant indentation or an identifier. The implicit keyword is neither of these.
Expectation
I would like the formatted output to look like this, since it compiles:
@kitbellew Looks like this might have been an issue with someone (manually) rewriting some old Scala 2 to use fewerBraces. Rewriting implicit id => ... as a context function id ?=> ... seems to fix the problem and scalafmt handles this as expected.
Configuration
Command-line parameters
When I run scalafmt via CLI like this:
scalafmt .
Steps
Given code like this:
Problem
Scalafmt formats code like this:
The formatted code no longer compiles because the next token after the colon in
Unsafe.unsafe:
needs to be either a newline/significant indentation or an identifier. The implicit keyword is neither of these.Expectation
I would like the formatted output to look like this, since it compiles:
The text was updated successfully, but these errors were encountered: