Skip to content

Commit 72577b1

Browse files
committed
add one more missing break
1 parent 31b611e commit 72577b1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Python/ast.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,9 @@ validate_pattern(struct validator *state, pattern_ty p, int star_ok)
613613
break;
614614
}
615615
}
616+
if (ret == 0) {
617+
break;
618+
}
616619

617620
for (Py_ssize_t i = 0; i < asdl_seq_LEN(p->v.MatchClass.kwd_attrs); i++) {
618621
PyObject *identifier = asdl_seq_GET(p->v.MatchClass.kwd_attrs, i);
@@ -624,6 +627,7 @@ validate_pattern(struct validator *state, pattern_ty p, int star_ok)
624627
if (ret == 0) {
625628
break;
626629
}
630+
627631
if (!validate_patterns(state, p->v.MatchClass.patterns, /*star_ok=*/0)) {
628632
ret = 0;
629633
break;

0 commit comments

Comments
 (0)