Commit f17fd02e authored by yoogx's avatar yoogx

* If the user provides a Type_Source_Name property, and the

          corresponding value refers to entities from Standard, simply
          use the type as subtype.
parent 9755f9b6
......@@ -316,12 +316,10 @@ package body Ocarina.Backends.PO_HI_Ada.Types is
L : constant Name_Id := Local_Name (Name);
P : Node_Id;
if U = No_Name then
(Loc (E),
"'Type_Source_Name' property value must be a fully"
& " qualified name", Fatal => True);
end if;
if U /= No_Name then
-- The user provided a fully qualified name that
-- is not prefixed by Standard, add this fully
-- qualified name in the package
P := Make_Designator (U);
......@@ -329,15 +327,20 @@ package body Ocarina.Backends.PO_HI_Ada.Types is
New_Node (ADN.K_Package_Specification));
Add_With_Package (P);
-- Get the full name
N := Make_Designator (L);
Set_Homogeneous_Parent_Unit_Name (N, P);
-- Otherwise, simply refer to Standard package
N := Make_Designator (L);
Set_Homogeneous_Parent_Unit_Name (N, RU (RU_Standard));
end if;
N := Make_Full_Type_Declaration
(Defining_Identifier => Map_Ada_Defining_Identifier (E),
Type_Definition => Make_Derived_Type_Definition
(N, Is_Subtype => True),
Is_Subtype => True);
-- Otherwise, we extract from the Data_Model specific
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