Skip to content

Commit 188c7c0

Browse files
committed
fix
1 parent 4d6b421 commit 188c7c0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/checkother.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2677,7 +2677,7 @@ void CheckOther::checkDuplicateBranch()
26772677
const std::string branch2 = tokElse->stringifyList(scope.bodyEnd->linkAt(2));
26782678

26792679
// check for duplicates
2680-
if (branch1 == branch2) {
2680+
if (branch1 == branch2 && branch1 != ";") {
26812681
duplicateBranchError(scope.classDef, scope.bodyEnd->next(), ErrorPath{});
26822682
continue;
26832683
}

0 commit comments

Comments
 (0)