luaur-analysis 0.1.3

Luau type checker and type inference (Rust).
Documentation
use crate::records::txn_log::TxnLog;
use crate::type_aliases::type_or_pack_id::TypeOrPackId;

impl TxnLog {
    pub fn have_seen_type_or_pack_id_type_or_pack_id(
        &self,
        lhs: TypeOrPackId,
        rhs: TypeOrPackId,
    ) -> bool {
        let sorted_pair = if lhs > rhs { (lhs, rhs) } else { (rhs, lhs) };

        if self.shared_seen.is_null() {
            return false;
        }

        let shared_seen = unsafe { &*self.shared_seen };
        shared_seen.iter().any(|&pair| pair == sorted_pair)
    }
}