fix: generalization bug

This commit is contained in:
Shunsuke Shibayama 2023-08-13 01:42:23 +09:00
parent 2e9fb48f2e
commit 974882490c
2 changed files with 75 additions and 136 deletions

View file

@ -153,7 +153,9 @@ impl Generalizer {
if sub == sup {
let t = self.generalize_t(sub, uninit);
let res = FreeVar(fv);
res.set_level(1);
res.destructive_link(&t);
res.generalize();
res
} else if sup != Obj
&& !self.qnames.contains(&fv.unbound_name().unwrap())