We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 229c737 commit b7f9127Copy full SHA for b7f9127
integration_tests/CMakeLists.txt
@@ -722,6 +722,7 @@ RUN(NAME global_syms_06 LABELS cpython llvm c)
722
723
RUN(NAME callback_01 LABELS cpython llvm c)
724
RUN(NAME callback_02 LABELS cpython llvm c)
725
+RUN(NAME callback_03 LABELS cpython llvm c)
726
727
# Intrinsic Functions
728
RUN(NAME intrinsics_01 LABELS cpython llvm NOFAST) # any
integration_tests/callback_03.py
@@ -0,0 +1,13 @@
1
+from lpython import i32, Callable
2
+
3
+def foo(x : i32) -> None:
4
+ print(x)
5
+ assert x == 3
6
7
+def bar(func : Callable[[i32], None], arg : i32) -> i32:
8
+ func(arg)
9
10
+def main0():
11
+ bar(foo, 3)
12
13
+main0()
0 commit comments