luaur-analysis 0.1.3

Luau type checker and type inference (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::functions::get_type_alt_j::get_type_id;
use crate::records::generic_type::GenericType;
use crate::records::instantiation_2::Instantiation2;
use crate::type_aliases::type_id::TypeId;

impl Instantiation2 {
    pub fn is_dirty_type_id(&self, ty: TypeId) -> bool {
        let gt = unsafe { get_type_id::<GenericType>(ty) };
        if gt.is_null() {
            return false;
        }
        unsafe { self.generic_substitutions.find(&ty) }.is_some()
    }
}