Closed
Description
From #2419
When we go from
def func() -> S:
return pi
To something like
def func(r: Out[S]) -> None:
r = pi
Or any cases like this where the subroutine_from_function pass is involved, we don't get rid of the redundant Return
node in the function body.
(=
(Var 3 _lpython_return_variable)
(IntrinsicScalarFunction
SymbolicPi
[]
0
(SymbolicExpression)
()
)
()
)
(Return)
Whereas x->m_return_var
points to nullptr
so we don't need this node.
Metadata
Metadata
Assignees
Labels
No labels