Commit 1ccef6f6 authored by yoogx's avatar yoogx
Browse files

* Find_Compoennt_Classifier returns either the actual

          component classifier, or dereference renames

          Fix for test AADL-CTS/04-Examples/04_2/Aircraft_Cockpit_4_2 in aadlqa
parent d9677160
......@@ -808,12 +808,25 @@ package body Ocarina.Analyzer.AADL.Finder is
pragma Assert (No (Package_Identifier)
or else Kind (Package_Identifier) = K_Identifier);
pragma Assert (Kind (Component_Identifier) = K_Identifier);
Pointed_Node : Node_Id;
begin
return Find_AADL_Declaration_Classifier
Pointed_Node := Find_AADL_Declaration_Classifier
(Root,
Package_Identifier,
Component_Identifier,
(K_Component_Type, K_Component_Implementation, K_Alias_Declaration));
-- In case the classifier is an alias, return the renamed entity
if Present (Pointed_Node)
and then Kind (Pointed_Node) = K_Alias_Declaration
then
Pointed_Node := Renamed_Entity (Pointed_Node);
end if;
return Pointed_Node;
end Find_Component_Classifier;
---------------------
......
......@@ -570,12 +570,6 @@ package body Ocarina.Analyzer.AADL.Links is
-- According to the AADL syntax, the component type must be in
-- the same namespace as the implementations.
if Present (Pointed_Node)
and then Kind (Pointed_Node) = K_Alias_Declaration
then
Pointed_Node := Renamed_Entity (Pointed_Node);
end if;
if No (Pointed_Node) then
DAE (Node1 => Node,
Message1 => " implements a component type that does not exist");
......
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