Skip to content

Commit

Permalink
FormatOps: strip removed blocks from only arg
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Dec 16, 2024
1 parent f0498a8 commit adb2eb1
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1429,14 +1429,14 @@ class FormatOps(
tree: Member.ArgClause,
res: List[FT],
): List[FT] = {
val args = tree.values
if (args.isEmpty) res
else {
val newres = getHead(tree) :: res
args match {
case (t: Member.Apply) :: Nil => getNestedOpens(t.argClause, newres)
case _ => newres
}
def newres = getHead(tree) :: res
tree.values match {
case Nil => res
case arg :: Nil => getBlockStat(arg) match {
case t: Member.Apply => getNestedOpens(t.argClause, newres)
case _ => newres
}
case _ => newres
}
}

Expand Down

0 comments on commit adb2eb1

Please sign in to comment.