From 6b408678413b518117467e1abb84114592f7050c Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 6 Dec 2009 00:32:09 +0100 Subject: [PATCH] extended test case --- tests/run/type_inference.pyx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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" -- 2.26.2