Skip to content

Commit

Permalink
Update CaseClause.hash for elseCase flag (#137)
Browse files Browse the repository at this point in the history
Updating node types is tricky – there are lots of places that need to be
updated, and many of them don’t cause any errors if you forget. I’ve
created the wiki page “changing nodes” to list all these places so that
this hopefully doesn’t happen again in the future.
  • Loading branch information
lucaswerkmeister committed Oct 3, 2017
1 parent 77624b4 commit b31759a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/ceylon/ast/core/CaseClause.ceylon
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ shared class CaseClause(caseItem, block, elseCase = false)
}

shared actual Integer hash
=> 31 * (caseItem.hash + 31*block.hash);
=> 31 * (caseItem.hash + 31 * (block.hash + 31*elseCase.hash));

shared CaseClause copy(CaseItem caseItem = this.caseItem, Block block = this.block, Boolean elseCase = this.elseCase) {
value ret = CaseClause(caseItem, block, elseCase);
Expand Down

0 comments on commit b31759a

Please sign in to comment.