luaur_analysis/methods/
constraint_solver_simplify_intersection_constraint_solver_alt_b.rs1use crate::functions::simplify_intersection_simplify::simplify_intersection;
2use crate::records::constraint_solver::ConstraintSolver;
3use crate::records::scope::Scope;
4use crate::records::type_ids::TypeIds;
5use crate::type_aliases::type_id::TypeId;
6use luaur_ast::records::location::Location;
7
8impl ConstraintSolver {
9 pub fn simplify_intersection_not_null_scope_location_type_ids(
10 &mut self,
11 _scope: *mut Scope,
12 _location: Location,
13 parts: TypeIds,
14 ) -> TypeId {
15 let left = parts.front();
16 let mut parts = parts;
17 parts.erase_type_id(left);
18 let right = parts.front();
19
20 simplify_intersection(self.builtin_types, self.arena, left, right).result
21 }
22}