Skip to main content

luaur_analysis/methods/
substitution_replace_substitution.rs

1use crate::records::substitution::Substitution;
2use crate::type_aliases::type_id::TypeId;
3
4impl Substitution {
5    pub fn replace_type_id(&mut self, ty: TypeId) -> TypeId {
6        let ty = unsafe { (*self.base.log).follow_type_id(ty) };
7        match self.new_types.find(&ty) {
8            Some(prev_ty) => *prev_ty,
9            None => ty,
10        }
11    }
12}