Skip to content

Commit dcc3f30

Browse files
committed
Reject calls with positional arguments after keyword arguments
1 parent 764e0af commit dcc3f30

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

vm/src/compile.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,8 @@ impl Compiler {
634634
kwarg_names.push(bytecode::Constant::String {
635635
value: kwarg.to_string(),
636636
});
637+
} else if kwarg_names.len() > 0 {
638+
panic!("positional argument follows keyword argument");
637639
};
638640
self.compile_expression(value);
639641
}

0 commit comments

Comments
 (0)