From: Stefan Behnel Date: Sat, 5 Dec 2009 23:32:09 +0000 (+0100) Subject: extended test case X-Git-Tag: 0.12.1~77 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=6b408678413b518117467e1abb84114592f7050c;p=cython.git extended test case --- diff --git a/tests/run/type_inference.pyx b/tests/run/type_inference.pyx index 0cfdd5e1..0666014b 100644 --- a/tests/run/type_inference.pyx +++ b/tests/run/type_inference.pyx @@ -203,3 +203,25 @@ def args_tuple_keywords(*args, **kwargs): """ assert typeof(args) == "tuple object", typeof(args) assert typeof(kwargs) == "dict object", typeof(kwargs) + +@infer_types('safe') +def args_tuple_keywords_reassign_same(*args, **kwargs): + """ + >>> args_tuple_keywords_reassign_same(1,2,3, a=1, b=2) + """ + assert typeof(args) == "tuple object", typeof(args) + assert typeof(kwargs) == "dict object", typeof(kwargs) + + args = () + kwargs = {} + +@infer_types('safe') +def args_tuple_keywords_reassign_pyobjects(*args, **kwargs): + """ + >>> args_tuple_keywords_reassign_pyobjects(1,2,3, a=1, b=2) + """ + assert typeof(args) == "Python object", typeof(args) + assert typeof(kwargs) == "Python object", typeof(kwargs) + + args = [] + kwargs = "test"