Fix error message of too many args #209

Merged
sb10q merged 1 commits from too_many_args_msg_fix into master 2022-03-05 10:17:42 +08:00
1 changed files with 4 additions and 1 deletions
Showing only changes of commit 42fbe8e383 - Show all commits

View File

@ -429,7 +429,10 @@ impl Unifier {
if signature.args.len() <= i {
self.restore_snapshot();
return Err(TypeError::new(
TypeErrorKind::TooManyArguments { expected: signature.args.len(), got: i },
TypeErrorKind::TooManyArguments {
expected: signature.args.len(),
got: posargs.len() + kwargs.len(),
},
*loc,
));
}