AugAssignment & Default Parameter Support, and Polymorphism FIxes #95
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/nac3#95
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "range_with_class"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
virtual
in min_artiqRelated to inheritance,
super().__init__()
are not supported yet (in nac3standalone, we need to manually initialize the base class attributes in the child class' constructor)... But in situations in nac3artiq where class objects are initilized on the host side this should not be a very big problem.I cherry-picked the first commit because it seemed simple enough and would solve a lot of practical problems.
For the others, please split them into separate self-contained functional PRs for easier review.
@ -1068,2 +1069,2 @@
args.args
let mut arg_with_defualt: Vec<(&ast::Located<ast::ArgData<()>>, Option<&ast::Expr>)> = args
typo
@ -1321,1 +1361,3 @@
default_value: None,
default_value: default.map(|default| {
if name == "self".into() {
panic!("`self` parameter cannot take default value at {}", x.location)
Return an error instead of calling
panic!
@ -69,0 +97,4 @@
);
internal_resolver.add_id_type(
if let ExprKind::Name { id, .. } = &targets[0].node { *id } else {
panic!("must assign simple name variable as type variable for now")
Remove "for now".
@ -344,0 +362,4 @@
Constant::Tuple(tuple) => Ok(SymbolValue::Tuple(
tuple.iter().map(|x| handle_constant(x, loc)).collect::<Result<Vec<_>, _>>()?
)),
_ => unimplemented!("this constant is not supported now at {}", loc),
remove "now"
Should we close this PR?
@ychenfo can you keep breaking down the remaining changes into separate PRs, and then delete the
range_with_class
branch?Yes, this PR can be closed.
Sure, but can I do this after the current two PRs is merged? Otherwise I think there seems to be quite a few contents that might cause some conflicts. I will create new PRs as soon as I.
Pull request closed