Skip to content
Snippets Groups Projects
Commit 44f65c0e authored by Damien George's avatar Damien George
Browse files

py: Fix bug in compiler which allowed through illegal augmented assign.

It allowed such things as (a, b) += c.
parent 5e1d993f
No related branches found
No related tags found
No related merge requests found
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment