Skip to content

Commit 8c2c809

Browse files
author
Nat
committed
fixed bug where "any" acted as "all"
1 parent 81b856f commit 8c2c809

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

typed_python/compiler/tests/any_all_compilation_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,5 @@ def callAll(x):
3232
assert callAll(T([1, 2, 3])) == all(T([1, 2, 3]))
3333
assert callAny(T([0, 0, 0])) == any(T([0, 0, 0]))
3434
assert callAll(T([0, 0, 0])) == all(T([0, 0, 0]))
35+
assert callAny(T([0, 1, 2])) == any(T([0, 1, 2]))
36+
assert callAll(T([0, 1, 2])) == all(T([0, 1, 2]))

typed_python/compiler/type_wrappers/all_any_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ def getNativeLayoutType(self):
5959
return native_ast.Type.Struct()
6060

6161
def convert_call(self, context, expr, args, kwargs):
62-
return context.call_py_function(all, args, kwargs)
62+
return context.call_py_function(any, args, kwargs)

0 commit comments

Comments
 (0)