core: reimplement assignment type inference and codegen + other minor changes & refactor #483

Merged
sb10q merged 4 commits from setitem-assign into master 2024-08-05 19:31:06 +08:00
1 changed files with 4 additions and 0 deletions
Showing only changes of commit acaf09477a - Show all commits

View File

@ -134,6 +134,10 @@ fn fix_assignment_target_context(node: &mut ast::Located<ExprKind>) {
| ExprKind::Subscript { ctx, .. } => {
*ctx = ExprContext::Store;
}
ExprKind::Starred { ctx, value } => {
*ctx = ExprContext::Store;
fix_assignment_target_context(value);
}
ExprKind::Tuple { ctx, elts } | ExprKind::List { ctx, elts } => {
*ctx = ExprContext::Store;
elts.iter_mut().for_each(fix_assignment_target_context);