1
0
forked from M-Labs/nac3

updated inference_context rules

This commit is contained in:
pca006132 2021-06-28 16:32:46 +08:00
parent e72d96f165
commit f43e225845

View File

@ -64,8 +64,10 @@ impl<'a> InferenceContext<'a> {
let (_, level) = self.stack.sym_def.last().unwrap(); let (_, level) = self.stack.sym_def.last().unwrap();
if *level > self.stack.level { if *level > self.stack.level {
let (name, _) = self.stack.sym_def.pop().unwrap(); let (name, _) = self.stack.sym_def.pop().unwrap();
let (t, _, l) = self.sym_table.remove(name).unwrap(); let (t, b, l) = self.sym_table.get_mut(name).unwrap();
poped_names.push((name, t, l)); // set it to be unreadable
*b = false;
poped_names.push((name, t.clone(), *l));
} else { } else {
break; break;
} }