Commit 371e0542 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Merge pull request #328 from ssarangi/master

Fixes issue #294
parents d72cf427 7b3f651e
......@@ -1552,11 +1552,39 @@ public:
target = remapName(ast_cast<AST_Name>(t));
break;
}
case AST_TYPE::List: {
AST_List* list = static_cast<AST_List*>(t);
AST_Delete* temp_ast_del = new AST_Delete();
temp_ast_del->lineno = node->lineno;
temp_ast_del->col_offset = node->col_offset;
for (auto elt : list->elts) {
temp_ast_del->targets.push_back(elt);
}
visit_delete(temp_ast_del);
break;
}
case AST_TYPE::Tuple: {
AST_Tuple* tuple = static_cast<AST_Tuple*>(t);
AST_Delete* temp_ast_del = new AST_Delete();
temp_ast_del->lineno = node->lineno;
temp_ast_del->col_offset = node->col_offset;
for (auto elt : tuple->elts) {
temp_ast_del->targets.push_back(elt);
}
visit_delete(temp_ast_del);
break;
}
default:
RELEASE_ASSERT(0, "Unsupported del target: %d", t->type);
}
astdel->targets.push_back(target);
push_back(astdel);
if (target != NULL)
astdel->targets.push_back(target);
if (astdel->targets.size() > 0)
push_back(astdel);
}
return true;
......
# expected: fail
# - we don't support this functionality yet
def f4():
a = 1
b = 2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment