Reject calls with positional arguments after keyword arguments

This commit is contained in:
Daniel Watkins
2018-08-29 19:46:34 -04:00
parent 764e0af433
commit dcc3f30db9

View File

@@ -634,6 +634,8 @@ impl Compiler {
kwarg_names.push(bytecode::Constant::String {
value: kwarg.to_string(),
});
} else if kwarg_names.len() > 0 {
panic!("positional argument follows keyword argument");
};
self.compile_expression(value);
}