Skip to main content

luaur_analysis/functions/
simplify_intersection_simplify_alt_b.rs

1use crate::records::builtin_types::BuiltinTypes;
2use crate::records::simplify_result::SimplifyResult;
3use crate::records::type_arena::TypeArena;
4use crate::records::type_ids::TypeIds;
5use crate::records::type_simplifier::TypeSimplifier;
6
7pub fn simplify_intersection_not_null_builtin_types_not_null_type_arena_type_ids(
8    builtin_types: *mut BuiltinTypes,
9    arena: *mut TypeArena,
10    parts: TypeIds,
11) -> SimplifyResult {
12    let mut s = TypeSimplifier {
13        builtin_types: builtin_types as *const BuiltinTypes,
14        arena: arena as *const TypeArena,
15        blocked_types: luaur_common::records::dense_hash_set::DenseHashSet::new(
16            core::ptr::null_mut(),
17        ),
18        recursion_depth: 0,
19    };
20
21    let res = s.intersect_from_parts(parts);
22
23    SimplifyResult {
24        result: res,
25        blocked_types: s.blocked_types,
26    }
27}