Skip to content

Commit

Permalink
Case.Branch expression is not encountered during transformExpression
Browse files Browse the repository at this point in the history
  • Loading branch information
Akirathan committed Nov 29, 2024
1 parent 19a128a commit 9ad1d9b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ case object ShadowedPatternFields extends MiniPassFactory {
expr match {
case branch: Case.Branch =>
lintCaseBranch(branch)
case caseExpr: Case.Expr =>
val newBranches = caseExpr.branches.map(lintCaseBranch)
caseExpr.copy(
branches = newBranches
)
case _ => expr
}
}
Expand Down

0 comments on commit 9ad1d9b

Please sign in to comment.