Skip to content

Commit

Permalink
Router: use implicit rule for vertical multiline
Browse files Browse the repository at this point in the history
Also, set a higher rank (policy applied later)
  • Loading branch information
kitbellew committed Mar 31, 2023
1 parent 32436ec commit e5c1e36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2427,12 +2427,11 @@ class Router(formatOps: FormatOps) {
}

case FormatToken(soft.ImplicitOrUsing(), _, ImplicitUsingOnLeft(params))
if style.binPack.unsafeDefnSite.isNever &&
!style.verticalMultiline.atDefnSite =>
if style.binPack.unsafeDefnSite.isNever =>
val spaceSplit = Split(Space, 0)
.notIf(style.newlines.forceAfterImplicitParamListModifier)
.withPolicy(
SingleLineBlock(params.tokens.last),
SingleLineBlock(params.tokens.last, rank = 1),
style.newlines.notPreferAfterImplicitParamListModifier
)
Seq(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,8 @@ object Foo {
a + b
def bar(
a: Int
)(implicit b: Int // c
)(implicit
b: Int // c
): Int =
a + b
}
Expand Down

0 comments on commit e5c1e36

Please sign in to comment.