Fix handling of default arguments after ignored ones in Python.
Don't skip checking subsequent arguments just because one of them has "in" typemap with numinputs=0 attribute. Add a unit test showing the problem which is relatively rare as it doesn't happen for the class methods and is hidden unless autodoc feature is used for the global functions. Closes #377.
This commit is contained in:
parent
d64c241e1c
commit
6988b00aba
4 changed files with 28 additions and 5 deletions
|
|
@ -110,6 +110,13 @@ def run(module_name):
|
|||
default_args.trickyvalue3(10); default_args.trickyvalue3(10, 10)
|
||||
default_args.seek(); default_args.seek(10)
|
||||
|
||||
if default_args.slightly_off_square(10) != 102:
|
||||
raise RuntimeError
|
||||
|
||||
if default_args.slightly_off_square() != 291:
|
||||
raise RuntimeError
|
||||
|
||||
|
||||
if __name__=="__main__":
|
||||
run('default_args')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue