mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 18:58:30 +00:00
parent
a10bc83d99
commit
eb67a33a12
2 changed files with 2 additions and 2 deletions
|
@ -2324,7 +2324,7 @@ impl Context {
|
|||
let new_sub = self
|
||||
.eval_t_params(maybe_sub.clone(), self.level, loc)
|
||||
.map_err(|(_, errs)| errs)?;
|
||||
if maybe_sub.is_unbound_var() && new_sub != Never && &new_sub != maybe_sub {
|
||||
if new_sub != Never && &new_sub != maybe_sub {
|
||||
maybe_sub.link(&new_sub, unifier.undoable);
|
||||
}
|
||||
let new_super = self
|
||||
|
|
|
@ -3702,7 +3702,7 @@ impl Type {
|
|||
Type::FreeVar(fv) if fv.is_linked() => {
|
||||
fv.crack().destructive_coerce();
|
||||
}
|
||||
Type::FreeVar(fv) if !fv.is_generalized() && fv.is_unbound_and_sandwiched() => {
|
||||
Type::FreeVar(fv) if fv.is_unbound_and_sandwiched() => {
|
||||
let (sub, _sup) = fv.get_subsup().unwrap();
|
||||
if !sub.contains_tvar(fv) {
|
||||
sub.destructive_coerce();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue