mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-02 21:44:34 +00:00
Merge branch 'main' into named_tuple
This commit is contained in:
commit
8323dd4094
2 changed files with 3 additions and 4 deletions
|
@ -403,13 +403,10 @@ impl Context {
|
|||
ast::ParamPattern::RefMut(_) => ref_mut(self_t, None),
|
||||
_ => self_t,
|
||||
};
|
||||
// spec_t == self_t (not spec_t <: self_t)
|
||||
// spec_t <: self_t
|
||||
if let Err(es) = self.sub_unify(spec_t, &self_t, name, Some(name.inspect())) {
|
||||
errs.extend(es);
|
||||
}
|
||||
if let Err(es) = self.sub_unify(&self_t, spec_t, name, Some(name.inspect())) {
|
||||
errs.extend(es);
|
||||
}
|
||||
} else {
|
||||
log!(err "self_t is None");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue