diff --git a/integration_tests/CMakeLists.txt b/integration_tests/CMakeLists.txt index 1051514f43..3540040ea6 100644 --- a/integration_tests/CMakeLists.txt +++ b/integration_tests/CMakeLists.txt @@ -775,6 +775,7 @@ RUN(NAME func_dep_03 LABELS cpython llvm c) RUN(NAME func_dep_04 LABELS cpython llvm c) RUN(NAME func_internal_def_01 LABELS cpython llvm NOFAST) RUN(NAME func_01 LABELS cpython llvm) +RUN(NAME func_02 LABELS c_sym) RUN(NAME float_01 LABELS cpython llvm c wasm wasm_x64) RUN(NAME recursive_01 LABELS cpython llvm c wasm wasm_x64 wasm_x86) diff --git a/integration_tests/func_02.py b/integration_tests/func_02.py new file mode 100644 index 0000000000..73c1f8e8f0 --- /dev/null +++ b/integration_tests/func_02.py @@ -0,0 +1,13 @@ +from lpython import S +from sympy import pi + +def func(r: Out[S]) -> None: + r = pi + +def test_func(): + z: S + func(z) + print(z) + assert z == pi + +test_func() diff --git a/integration_tests/symbolics_13.py b/integration_tests/symbolics_13.py index 06f2c27599..6494d28a40 100644 --- a/integration_tests/symbolics_13.py +++ b/integration_tests/symbolics_13.py @@ -1,5 +1,5 @@ from lpython import S -from sympy import pi, Symbol +from sympy import pi def func() -> S: return pi @@ -9,4 +9,4 @@ def test_func(): print(z) assert z == pi -test_func() \ No newline at end of file +test_func()