missing scoping
This commit is contained in:
parent
be2d38a6d2
commit
33d78fbc52
|
@ -2971,6 +2971,7 @@ impl<'a> Codegen<'a> {
|
|||
}
|
||||
Expr::Block { stmts, .. } => {
|
||||
let base = self.ci.scope.vars.len();
|
||||
let aclass_base = self.ci.scope.aclasses.len();
|
||||
|
||||
let mut ret = Some(Value::VOID);
|
||||
for stmt in stmts {
|
||||
|
@ -2986,6 +2987,10 @@ impl<'a> Codegen<'a> {
|
|||
var.remove(&mut self.ci.nodes);
|
||||
}
|
||||
|
||||
for aclass in self.ci.scope.aclasses.drain(aclass_base..) {
|
||||
aclass.remove(&mut self.ci.nodes);
|
||||
}
|
||||
|
||||
ret
|
||||
}
|
||||
Expr::Loop { body, .. } => {
|
||||
|
@ -3481,6 +3486,10 @@ impl<'a> Codegen<'a> {
|
|||
.vars
|
||||
.drain(loob.scope.vars.len()..)
|
||||
.for_each(|v| v.remove(&mut self.ci.nodes));
|
||||
loob.ctrl_scope[id]
|
||||
.aclasses
|
||||
.drain(loob.scope.aclasses.len()..)
|
||||
.for_each(|v| v.remove(&mut self.ci.nodes));
|
||||
}
|
||||
|
||||
None
|
||||
|
|
Loading…
Reference in a new issue