diff --git a/crates/erg_compiler/context/unify.rs b/crates/erg_compiler/context/unify.rs index 8a7c60915..fea7e0dcc 100644 --- a/crates/erg_compiler/context/unify.rs +++ b/crates/erg_compiler/context/unify.rs @@ -1298,6 +1298,7 @@ impl<'c, 'l, 'u, L: Locational> Unifier<'c, 'l, 'u, L> { // self.sub_unify(&lsub, &union, loc, param_name)?; maybe_sup.update_tyvar(union, intersec, self.undoable, false); } + // TODO: Preferentially compare same-structure types (e.g. K(?T) <: K(?U)) (And(ltys), And(rtys)) => { let mut ltys_ = ltys.clone(); let mut rtys_ = rtys.clone(); @@ -1322,6 +1323,7 @@ impl<'c, 'l, 'u, L: Locational> Unifier<'c, 'l, 'u, L> { } } } + // TODO: Preferentially compare same-structure types (e.g. K(?T) <: K(?U)) // Nat or Str or NoneType <: NoneType or ?T or Int // => Str <: ?T // (Int or ?T) <: (?U or Int)