Closed
Description
Example:
from ltypes import f64
def f() -> f64:
return 5.5
def main():
t1: f64 = f()*1e6
print(t1)
main()
This generates:
$ lpython --show-c a.py
...
void _xx_lcompilers_changed_main_xx()
{
double t1 = f()* 1.00000000000000000e+06;
t1 = f()* 1.00000000000000000e+06;
printf("%lf\n", t1);
}
...
Which is wrong, it should only be initialized once.