core/typecheck: fix missing ExprKind::Asterisk in fix_assignment_target_context

This commit is contained in:
lyken 2024-08-05 11:19:32 +08:00 committed by sb10q
parent 221de4d06a
commit 3a8c385e01
1 changed files with 4 additions and 0 deletions

View File

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