Skip to content

Commit

Permalink
py: Fix bug in compiler which allowed through illegal augmented assign.
Browse files Browse the repository at this point in the history
It allowed such things as (a, b) += c.
  • Loading branch information
dpgeorge committed Mar 25, 2015
1 parent 5e1d993 commit 44f65c0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions py/compile.c
Expand Up @@ -858,6 +858,9 @@ STATIC void c_assign(compiler_t *comp, mp_parse_node_t pn, assign_kind_t assign_
// empty tuple
goto cannot_assign;
} else if (MP_PARSE_NODE_IS_STRUCT_KIND(pns->nodes[0], PN_testlist_comp)) {
if (assign_kind != ASSIGN_STORE) {
goto bad_aug;
}
pns = (mp_parse_node_struct_t*)pns->nodes[0];
goto testlist_comp;
} else {
Expand Down

0 comments on commit 44f65c0

Please sign in to comment.