mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 18:58:30 +00:00
fix: generalization bug
This commit is contained in:
parent
2e9fb48f2e
commit
974882490c
2 changed files with 75 additions and 136 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue