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(())