Python -builtin fix wrapping constructors with varargs

Fix compilation error when using -builtin and wrapping varargs in constructors

Closes #1942
This commit is contained in:
William S Fulton 2021-03-23 23:57:49 +00:00
commit 90cdbee6a6
6 changed files with 64 additions and 10 deletions

View file

@ -122,3 +122,18 @@ try:
raise RuntimeError("missed exception")
except TypeError as e:
pass
# Varargs
f = VarargConstructor(fmt="Ciao")
f.vararg_method(fmt="Bonjour")
try:
f = VarargConstructor(nonexistent="Ciao")
raise RuntimeError("missed exception")
except TypeError as e:
pass
try:
f.vararg_method(nonexistent="Bonjour")
raise RuntimeError("missed exception")
except TypeError as e:
pass