Add support for global variables without type annotation #548

Merged
sb10q merged 4 commits from enhance/global-var into master 2024-10-08 09:05:38 +08:00
Collaborator
No description provided.
derppening added 2 commits 2024-10-07 17:16:41 +08:00
derppening requested review from sb10q 2024-10-07 17:17:09 +08:00
sb10q reviewed 2024-10-07 17:43:34 +08:00
@ -384,1 +384,4 @@
ast::StmtKind::Assign { .. } => {
panic!("Registration of top-level Assign statements must use TopLevelComposer::register_top_level_var (at {})", ast.location);
}
Owner

It's rather confusing why there is such a difference between Assign and AnnAssign. Maybe further code comments would help?

It's rather confusing why there is such a difference between Assign and AnnAssign. Maybe further code comments would help?
Author
Collaborator

Added a code comment explaining why the difference in behavior.

Added a code comment explaining why the difference in behavior.
derppening force-pushed enhance/global-var from b2bfd0e9b3 to 5839badadd 2024-10-07 20:44:14 +08:00 Compare
sb10q merged commit 5839badadd into master 2024-10-08 09:05:38 +08:00
sb10q deleted branch enhance/global-var 2024-10-08 09:05:38 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 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#548
No description provided.