[core] Fix resolution of exception names in raise short form #507

Merged
sb10q merged 1 commits from fix/issue-501 into master 2024-08-26 18:35:02 +08:00
Collaborator

Previous implementation fails as resolver.get_identifier_def in ARTIQ
would return the exception init function rather than the class.

We fix this by limiting the exception class resolution to only include
raise statements, and to force the exception name to always be treated
as a class.

Fixes #501.

Previous implementation fails as `resolver.get_identifier_def` in ARTIQ would return the exception __init__ function rather than the class. We fix this by limiting the exception class resolution to only include raise statements, and to force the exception name to always be treated as a class. Fixes #501.
derppening added 1 commit 2024-08-26 14:30:03 +08:00
Previous implementation fails as `resolver.get_identifier_def` in ARTIQ
would return the exception __init__ function rather than the class.

We fix this by limiting the exception class resolution to only include
raise statements, and to force the exception name to always be treated
as a class.

Fixes #501.
derppening requested review from sb10q 2024-08-26 14:30:06 +08:00
sb10q merged commit 2b2b2dbf8f into master 2024-08-26 18:35:02 +08:00
sb10q deleted branch fix/issue-501 2024-08-26 18:35:03 +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#507
No description provided.