diff --git a/src/compile.rs b/src/compile.rs index 7194c88..890ff8e 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -1616,10 +1616,13 @@ impl Compiler { Comprehension { kind, generators } => { self.compile_comprehension(kind, generators)?; } - Starred { value } => { - self.compile_expression(value)?; - self.emit(Instruction::Unpack); - panic!("We should not just unpack a starred args, since the size is unknown."); + Starred { .. } => { + return Err(CompileError { + error: CompileErrorType::SyntaxError(std::string::String::from( + "Invalid starred expression", + )), + location: self.current_source_location.clone(), + }); } IfExpression { test, body, orelse } => { let no_label = self.new_label();