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
15
16
17
use crate::records::function_type::FunctionType;
use crate::records::instantiation::Instantiation;
use crate::type_aliases::type_id::TypeId;

impl Instantiation {
    pub fn is_dirty_type_id(&self, ty: TypeId) -> bool {
        let log = self.base.base.log;
        let ftv = unsafe { (*log).txn_log_get_mutable::<FunctionType, TypeId>(ty) };
        if !ftv.is_null() {
            if unsafe { (*ftv).has_no_free_or_generic_types } {
                return false;
            }
            return true;
        }
        false
    }
}