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:
Vadim Zeitlin 2015-04-27 23:14:34 +02:00
commit 6988b00aba
4 changed files with 28 additions and 5 deletions

View file

@ -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')