Skip to content

Commit

Permalink
Add tests for semicolons in PreferCurlyFors
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed May 19, 2024
1 parent 8624463 commit 408c8ed
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion scalafmt-tests/src/test/resources/rewrite/PreferCurlyFors.stat
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,18 @@ object O {
c = pos.split("->")
} yield ()
}
<<< #2695 generator and multiple guards
<<< #2695 generator and multiple guards, braces but semicolons
object O {
for { a <- b; if c; if d } yield ()
}
>>>
object O {
for {
a <- b if c
if d
} yield ()
}
<<< #2695 generator and multiple guards, parens and semicolons
object O {
for (a <- b; if c; if d) yield ()
}
Expand Down

0 comments on commit 408c8ed

Please sign in to comment.