From 3a8c385e0193239d806f8ce6fddd822da66a77d5 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 0a98a575..cd02e0e3 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);