chore: add Self substitution

This commit is contained in:
Shunsuke Shibayama 2023-08-17 19:25:17 +09:00
parent 8323dd4094
commit 927de74eee
5 changed files with 35 additions and 3 deletions

View file

@ -288,6 +288,7 @@ impl Context {
None
};
for rhs_sup in get_types(ty_ctx) {
let _subs = Substituter::substitute_self(rhs_sup, rhs, self);
// Not `supertype_of` (only structures are compared)
match Self::cheap_supertype_of(lhs, rhs_sup) {
(Absolutely, true) => {