luaur_analysis/methods/
constraint_solver_has_unresolved_constraints.rs1use crate::functions::follow_type::follow_type_id;
2use crate::records::constraint_solver::ConstraintSolver;
3use crate::type_aliases::type_id::TypeId;
4
5impl ConstraintSolver {
6 pub fn has_unresolved_constraints(&mut self, ty: TypeId) -> bool {
7 if luaur_common::FFlag::LuauConstraintGraph.get() {
8 let ty = unsafe { follow_type_id(ty) };
9 unsafe {
10 (*self.cgraph).has_unsolved_dependencies(
11 crate::type_aliases::constraint_vertex::ConstraintVertex::V0(ty),
12 )
13 }
14 } else {
15 let ty = unsafe { follow_type_id(ty) };
16 if let Some(set) = self.deprecated_type_to_constraint_set.get(&ty) {
17 !set.is_empty()
18 } else {
19 false
20 }
21 }
22 }
23}