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
18
use crate::records::pending_type::PendingType;
use crate::records::r#type::Type;
use crate::records::txn_log::TxnLog;
use crate::type_aliases::type_id::TypeId;

impl TxnLog {
    pub fn replace_type_id_type_item(
        &mut self,
        _ty: TypeId,
        _replacement: Type,
    ) -> *mut PendingType {
        let new_ty = self.queue_type_id(_ty);
        unsafe {
            (*new_ty).pending.reassign(&_replacement);
        }
        new_ty
    }
}