File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -694,7 +694,8 @@ RUN(NAME global_syms_04 LABELS cpython llvm c wasm wasm_x64)
694694RUN(NAME global_syms_05 LABELS cpython llvm c)
695695RUN(NAME global_syms_06 LABELS cpython llvm c)
696696
697- RUN(NAME callback_01 LABELS cpython llvm)
697+ RUN(NAME callback_01 LABELS cpython llvm c)
698+ RUN(NAME callback_02 LABELS cpython llvm c)
698699
699700# Intrinsic Functions
700701RUN(NAME intrinsics_01 LABELS cpython llvm NOFAST) # any
Original file line number Diff line number Diff line change 1+ from lpython import ccallback , i32 , Callable
2+
3+ # test issue 2169
4+
5+ def foo (x : i32 ) -> i32 :
6+ return x ** 2
7+
8+ def bar (func : Callable [[i32 ], i32 ], arg : i32 ) -> i32 :
9+ return func (arg )
10+
11+ @ccallback
12+ def entry_point () -> None :
13+ z : i32 = 5
14+ x : i32 = bar (foo , z )
15+ assert z ** 2 == x
16+
17+
18+ entry_point ()
You can’t perform that action at this time.
0 commit comments