Skip to main content

luaur_analysis/methods/
unifier_2_unify_unifier_2_alt_j.rs

1use crate::enums::unify_result::UnifyResult;
2use crate::records::metatable_type::MetatableType;
3use crate::records::unifier_2::Unifier2;
4
5impl Unifier2 {
6    pub fn unify_metatable_type_metatable_type(
7        &mut self,
8        sub_metatable: &MetatableType,
9        super_metatable: &MetatableType,
10    ) -> UnifyResult {
11        let metatable_result =
12            self.unify_type_id_type_id(sub_metatable.metatable, super_metatable.metatable);
13        if metatable_result != UnifyResult::Ok {
14            return metatable_result;
15        }
16        self.unify_type_id_type_id(sub_metatable.table, super_metatable.table)
17    }
18}