Closed
Description
This issue was brought up here (lfortran/lfortran#3432 (comment))
We were lucky to not have encountered this issue in Lpython itself. Consider the following
def main0():
x: S = Symbol('x')
y: S = Symbol('y')
z: S = x + y
print(z.func == Add)
main0()
So this is an example which is solved by the code in consideration
lpython/src/libasr/pass/replace_symbolic.cpp
Lines 786 to 788 in 7796f6d