Commit c0cdf91b authored by yoogx's avatar yoogx
Browse files

* Handle situation where the record term element is not a record type

        Fixes regression for properties like Transmission_Time

        For issue #30
parent 13da19e8
...@@ -3199,26 +3199,37 @@ package body Ocarina.Analyzer.AADL.Links is ...@@ -3199,26 +3199,37 @@ package body Ocarina.Analyzer.AADL.Links is
-- iterate over the property designator until we -- iterate over the property designator until we
-- find the corresponding entity to operate on. -- find the corresponding entity to operate on.
List_Node := First_Node if Kind (Property_Type_Designator
(List_Items (Entity
(Property_Type_Designator (Property_Type_Designator
(Entity (Property_Type)))) = K_Record_Type
(Property_Type_Designator then
(Property_Type))))); List_Node := First_Node
(List_Items
while Present (List_Node) loop (Property_Type_Designator
-- A property type is a list of record_type element (Entity
-- XXX should use case insensitive match ? (Property_Type_Designator
if Ocarina.ME_AADL.AADL_Tree.Nodes.Display_Name (Property_Type)))));
(Identifier (List_Node)) =
Display_Name (Identifier (Property_Container)) while Present (List_Node) loop
then -- A property type is a list of record_type element
Unit_Type := Unwind_Units_Type (Root, List_Node); -- XXX should use case insensitive match ?
exit; if Ocarina.ME_AADL.AADL_Tree.Nodes.Display_Name
end if; (Identifier (List_Node)) =
List_Node := Next_Node (List_Node); Display_Name (Identifier (Property_Container))
end loop; then
Unit_Type := Unwind_Units_Type (Root, List_Node);
exit;
end if;
List_Node := Next_Node (List_Node);
end loop;
else
Unit_Type := Unwind_Units_Type
(Root, Property_Type_Designator
(Entity
(Property_Type_Designator
(Property_Type))));
end if;
else else
Unit_Type := Unwind_Units_Type (Root, Property_Type); Unit_Type := Unwind_Units_Type (Root, Property_Type);
end if; end if;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment