Merge branch 'main' into named_tuple

This commit is contained in:
Shunsuke Shibayama 2023-08-17 16:53:38 +09:00
commit 8323dd4094
2 changed files with 3 additions and 4 deletions

View file

@ -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");
}