lcompilers / lpython

Python compiler
https://lpython.org/
Other
1.47k stars 157 forks source link

Refactor string attributes and add constant string implementations #2524

Closed advikkabra closed 5 months ago

advikkabra commented 5 months ago
certik commented 5 months ago

Not sure what is going on, but somehow the CI shows an error:

semantic error: Variable 'x' not declared
   --> /home/runner/work/lpython/lpython/src/bin/../runtime/lpython_builtin.py:348:16
    |
348 |     return c64(x) + c64(0)*1j
    |                ^ 
advikkabra commented 5 months ago

I am not sure what is going on either, as there are no changes in lpython_builtin.py which should cause an error there. I will take a look again.

advikkabra commented 5 months ago

I tried building and running the tests locally, but I could not replicate the issue. I am using Ubuntu 22.04, so I am unsure why the CI is failing.

@interface
@overload
def complex(x: f64) -> c64:
    return c64(x) + c64(0)*1j

This is the function where there is an error. x is declared, so I do not know why there is a bug.

advikkabra commented 5 months ago

@certik Please take a look at this when you can, I am not sure how to fix this issue.