Skip to content

Commit

Permalink
TESTS: For callback with None return type
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaikh-Ubaid committed Jul 24, 2023
1 parent 229c737 commit b7f9127
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions integration_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,7 @@ RUN(NAME global_syms_06 LABELS cpython llvm c)

RUN(NAME callback_01 LABELS cpython llvm c)
RUN(NAME callback_02 LABELS cpython llvm c)
RUN(NAME callback_03 LABELS cpython llvm c)

# Intrinsic Functions
RUN(NAME intrinsics_01 LABELS cpython llvm NOFAST) # any
Expand Down
13 changes: 13 additions & 0 deletions integration_tests/callback_03.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from lpython import i32, Callable

def foo(x : i32) -> None:
print(x)
assert x == 3

def bar(func : Callable[[i32], None], arg : i32) -> i32:
func(arg)

def main0():
bar(foo, 3)

main0()

0 comments on commit b7f9127

Please sign in to comment.