From acaf09477a1d51bd9ec2f9a59bad40dd15ece849 Mon Sep 17 00:00:00 2001 From: lyken Date: Mon, 5 Aug 2024 11:19:32 +0800 Subject: [PATCH] core/typecheck: fix missing ExprKind::Asterisk in fix_assignment_target_context --- nac3core/src/typecheck/type_inferencer/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nac3core/src/typecheck/type_inferencer/mod.rs b/nac3core/src/typecheck/type_inferencer/mod.rs index 09127618..7e789079 100644 --- a/nac3core/src/typecheck/type_inferencer/mod.rs +++ b/nac3core/src/typecheck/type_inferencer/mod.rs @@ -134,6 +134,10 @@ fn fix_assignment_target_context(node: &mut ast::Located) { | 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);