mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-02 21:44:34 +00:00
fix: dict type bug
This commit is contained in:
parent
3f61bc5c17
commit
144a05ec6b
7 changed files with 82 additions and 27 deletions
|
@ -1497,11 +1497,7 @@ impl<'c, 'l, 'u, L: Locational> Unifier<'c, 'l, 'u, L> {
|
|||
return Ok(());
|
||||
}
|
||||
let sub = mem::take(&mut sub);
|
||||
let new_sup = if let Some(new_sup) = self.ctx.min(&sup, maybe_sup).either() {
|
||||
new_sup.clone()
|
||||
} else {
|
||||
self.ctx.intersection(&sup, maybe_sup)
|
||||
};
|
||||
let new_sup = self.ctx.intersection(&sup, maybe_sup);
|
||||
self.sub_unify(&sub, &new_sup)?;
|
||||
// ?T(:> Int, <: Int) ==> ?T == Int
|
||||
// ?T(:> List(Int, 3), <: List(?T, ?N)) ==> ?T == List(Int, 3)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue