Skip to main content

luaur_analysis/methods/
constraint_graph_has_unsolved_dependencies.rs

1use crate::records::constraint_graph::ConstraintGraph;
2use crate::records::primitive_type_constraint::PrimitiveTypeConstraint;
3use crate::type_aliases::constraint_v::ConstraintVMember;
4use crate::type_aliases::constraint_vertex::ConstraintVertex;
5
6impl ConstraintGraph {
7    pub fn has_unsolved_dependencies(&mut self, vertex: ConstraintVertex) -> bool {
8        let deps = self.find_dependency_list(vertex.clone());
9
10        if let Some(c) = vertex.get_if_2() {
11            let constraint = unsafe { &**c };
12            if PrimitiveTypeConstraint::get_if(&constraint.c).is_some() {
13                return unsafe { deps.as_ref().size() > 1 };
14            }
15        }
16
17        unsafe { deps.as_ref().size() > 0 }
18    }
19}