nac3core: fix err msg of too many args

This commit is contained in:
ychenfo 2022-03-05 03:59:45 +08:00
parent 63b0f29728
commit 42fbe8e383
1 changed files with 4 additions and 1 deletions

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,
));
}