diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/all.test | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/all.test b/tests/all.test index f70979cc..35293dc2 100644 --- a/tests/all.test +++ b/tests/all.test @@ -434,6 +434,11 @@ def f(x): x | x; f([.], . + [42]) [[1,2,3,42]] [1,2,3,42,42] +# test multiple function arities and redefinition +def f: .+1; def g: f; def f: .+100; def f(a):a+.+11; [(g|f(20)), f] +1 +[33,101] + # test closures and lexical scoping def id(x):x; 2000 as $x | def f(x):1 as $x | id([$x, x, x]); def g(x): 100 as $x | f($x,$x+x); g($x) "more testing" |