nac3core: fix assign to constant #237

Merged
sb10q merged 1 commits from assign_to_const into master 2022-03-24 09:59:02 +08:00
Collaborator

this kind of error is missed currently and will cause codegen to panic on code like:

def run() -> int32:
    2, (aa, 4) = 3, (5, 5)
    return 0

output:

thread '<unnamed>' panicked at 'internal error: entered unreachable code', /home/cresc/code/nac3/work1/nac3/nac3core/src/codegen/stmt.rs:93:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Got an error: internal error: entered unreachable code
thread 'main' panicked at 'tasks panicked', nac3core/src/codegen/mod.rs:191:13
this kind of error is missed currently and will cause codegen to panic on code like: ```python def run() -> int32: 2, (aa, 4) = 3, (5, 5) return 0 ``` output: ``` thread '<unnamed>' panicked at 'internal error: entered unreachable code', /home/cresc/code/nac3/work1/nac3/nac3core/src/codegen/stmt.rs:93:14 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Got an error: internal error: entered unreachable code thread 'main' panicked at 'tasks panicked', nac3core/src/codegen/mod.rs:191:13 ```
ychenfo added 1 commit 2022-03-24 07:17:33 +08:00
sb10q merged commit be75fa7368 into master 2022-03-24 09:59:02 +08:00
sb10q deleted branch assign_to_const 2022-03-24 09:59:02 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#237
No description provided.