Update tyvar.rs

This commit is contained in:
Shunsuke Shibayama 2022-08-30 21:23:08 +09:00
parent bddfef5cc9
commit 824f85e18c

View file

@ -1001,7 +1001,7 @@ impl Context {
erg_common::log!(info "trying sub_unify:\nmaybe_sub: {maybe_sub}\nmaybe_sup: {maybe_sup}"); erg_common::log!(info "trying sub_unify:\nmaybe_sub: {maybe_sub}\nmaybe_sup: {maybe_sup}");
// In this case, there is no new information to be gained // In this case, there is no new information to be gained
// この場合、特に新しく得られる情報はない // この場合、特に新しく得られる情報はない
if maybe_sub == &Type::Never || maybe_sup == &Type::Obj { if maybe_sub == &Type::Never || maybe_sup == &Type::Obj || maybe_sup == maybe_sub {
return Ok(()); return Ok(());
} }
let maybe_sub_is_sub = self.rec_subtype_of(maybe_sub, maybe_sup); let maybe_sub_is_sub = self.rec_subtype_of(maybe_sub, maybe_sup);