Skip to content

CPython allows uninitialized variable, LPython does not ? #1991

Open
@rebcabin

Description

@rebcabin

Not sure whether this is intentional.

repro: https://github.com/rebcabin/lpython/tree/brian-lasr/lasr/LP-pycharm/Issue1990

CPython:

(lp) ┌─(~/CLionProjects/lpython/lasr/LP-pycharm/Issue1990)───────────────────────────────────────────────────────────────────────────────────────────────(brian@Golf37:s014)─┐
└─(13:34:57 on brian-lasr ✖ ✭)──> PYTHONPATH='../../../src/runtime/lpython' python ./lasr_lexer.py                                                        ──(Wed,Jun21)─┘
STRINGIO TEST
READ-SEEK-TELL-TEST
LEXER TEST
REGEX TEST

LPython:

(lp) ┌─(~/CLionProjects/lpython/lasr/LP-pycharm/Issue1990)───────────────────────────────────────────────────────────────────────────────────────────────(brian@Golf37:s014)─┐
└─(13:36:44 on brian-lasr ✖ ✭)──> ../../../src/bin/lpython -I. ./lasr_lexer.py                                                                            ──(Wed,Jun21)─┘
semantic error: `rr` must be initialized with an instance of ReRange
   --> ./lasr_lexer.py:139:5
    |
139 |     rr : ReRange
    |     ^^^^^^^^^^^^ 

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions