Skip to content

Commit

Permalink
refactor: renamed alt1 and alt2 to avoid shadowing
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mie6 committed Dec 27, 2024
1 parent 1715cab commit dcb5c32
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ private [deepembedding] final class Choice[A](private [backend] val alt1: Strict
alts.addOne(p)
alts.stealAll(alts_)
ret
case Choice(_, Choice(alt1, alt2, alts: SinglyLinkedList[StrictParsley[A]]), alts_) =>
case Choice(_, Choice(alt1_, alt2_, alts: SinglyLinkedList[StrictParsley[A]]), alts_) =>
assume(!alts.exists(_.isInstanceOf[Choice[_]]), "alts can never contain a choice")
assume(!alts_.exists(_.isInstanceOf[Choice[_]]), "alts_ can never contain a choice")
this.alt2 = alt1
this.alt2 = alt1_
this.alts = alts
alts.prependOne(alt2)
alts.prependOne(alt2_)
alts.stealAll(alts_)
this
case _ => this
Expand Down

0 comments on commit dcb5c32

Please sign in to comment.