Skip to main content

luaur_analysis/methods/
reference_count_initializer_visit_constraint_alt_g.rs

1use crate::records::blocked_type_pack::BlockedTypePack;
2use crate::records::reference_count_initializer::ReferenceCountInitializer;
3use crate::type_aliases::type_pack_id::TypePackId;
4use luaur_common::macros::luau_assert::LUAU_ASSERT;
5use luaur_common::FFlag;
6
7impl ReferenceCountInitializer {
8    pub fn visit_type_pack_id_blocked_type_pack(
9        &mut self,
10        tp: TypePackId,
11        _blocked_type_pack: &BlockedTypePack,
12    ) -> bool {
13        if FFlag::LuauConstraintGraph.get() {
14            LUAU_ASSERT!(self.mutated_type_packs.is_null() == false);
15            unsafe {
16                (*self.mutated_type_packs).insert(tp);
17            }
18        }
19        true
20    }
21}