From 1257331101ff4b9c765983b7bb42525c560da4be Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Wed, 13 May 2020 01:48:40 +0900 Subject: [PATCH] Fix unpack_ex related messages --- src/compile.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/compile.rs b/src/compile.rs index 4a8ee90..53aa362 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -1399,7 +1399,14 @@ impl Compiler { } } } - _ => return Err(self.error(CompileErrorType::Assign(target.name()))), + _ => { + return Err(self.error(match target.node { + ast::ExpressionType::Starred { .. } => CompileErrorType::SyntaxError( + "starred assignment target must be in a list or tuple".to_owned(), + ), + _ => CompileErrorType::Assign(target.name()), + })) + } } Ok(())