Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed bug where "any" acted as "all" #448

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions typed_python/compiler/tests/any_all_compilation_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ def callAll(x):
assert callAll(T([1, 2, 3])) == all(T([1, 2, 3]))
assert callAny(T([0, 0, 0])) == any(T([0, 0, 0]))
assert callAll(T([0, 0, 0])) == all(T([0, 0, 0]))
assert callAny(T([0, 1, 2])) == any(T([0, 1, 2]))
assert callAll(T([0, 1, 2])) == all(T([0, 1, 2]))
2 changes: 1 addition & 1 deletion typed_python/compiler/type_wrappers/all_any_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ def getNativeLayoutType(self):
return native_ast.Type.Struct()

def convert_call(self, context, expr, args, kwargs):
return context.call_py_function(all, args, kwargs)
return context.call_py_function(any, args, kwargs)
Loading