use crate::records::pending_type::PendingType;
use crate::records::table_type::TableType;
use crate::records::txn_log::TxnLog;
use crate::type_aliases::type_id::TypeId;
use luaur_common::macros::luau_assert::LUAU_ASSERT;
impl TxnLog {
pub fn bind_table(&mut self, ty: TypeId, new_bound_to: Option<TypeId>) -> *mut PendingType {
let new_ty = self.queue_type_id(ty);
unsafe {
let table_type = crate::functions::get_mutable_txn_log::get_mutable_pending_type::<
TableType,
>(new_ty);
if !table_type.is_null() {
(*table_type).bound_to = new_bound_to;
}
}
new_ty
}
}