Skip to content

Program passes lpython but not CPython #2487

Open
@rebcabin

Description

@rebcabin
from lpython import CPtr

A : CPtr

def foo(a : CPtr) -> None:
    pass

foo(A)
(lp) ┌─(~/Documents/GitHub/lpython/integration_tests)───(brian@MacBook-Pro:s001)─┐
└─(19:55:25 on vector-backend ✹ ✭)──> lpython ../ISSUES/UNHANDLED-EXCEPTIONS/Issue2487.py    
(lp) ┌─(~/Documents/GitHub/lpython/integration_tests)───(brian@MacBook-Pro:s001)─┐
└─(19:55:35 on vector-backend ✹ ✭)──> PYTHONPATH=".:../src/runtime/lpython:.." LPYTHON_PY_MOD_NAME="" LPYTHON_PY_MOD_PATH="_lpython-tmp-test-cpython" python ../ISSUES/UNHANDLED-EXCEPTIONS/Issue2487.py
Traceback (most recent call last):
  File "/Users/brian/Dropbox/Mac/Documents/GitHub/lpython/integration_tests/../ISSUES/UNHANDLED-EXCEPTIONS/Issue2487.py", line 8, in <module>
    foo(A)
NameError: name 'A' is not defined

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions