!editorial comment 119 !topic Subunits returns Unit_Kinds which are not subunits !reference ASIS 95-10.32 !from Gary Barnes 98-10-06 The description of the Subunits functions includes returned Unit_Kinds which are not subunits. This is presumably a typo? eg. A_Procedure_Body. Also, the textual description indicates that units of the A_Nonexistent_Body Unit_Kind can be returned but A_Nonexistent_Body is not in the list of returned Unit_Kinds. Original text: ------------------------------------------------------------------------------- -- 10.32 function Subunits ------------------------------------------------------------------------------- function Subunits (Parent_Body : in Asis.Compilation_Unit) return Asis.Compilation_Unit_List; function Subunits (Parent_Body : in Asis.Compilation_Unit; The_Context : in Asis.Context) return Asis.Compilation_Unit_List; ------------------------------------------------------------------------------- -- Parent_Body - Specifies the parent unit to query -- The_Context - Specifies the program Context to use for context -- -- Returns a complete list of subunit values, with one value for each body -- stub that appears in the given Parent_Body. Returns a -- Nil_Compilation_Unit_List if the parent unit does not contain any body -- stubs. Every unit in the result will have an Enclosing_Context that -- Is_Identical to The_Context. -- -- These two function calls will always produce identical results: -- -- SUnits := Subunits ( PUnit ); -- SUnits := Subunits ( PUnit, Enclosing_Context ( PUnit )); -- -- The result may include unit values with a nonexistent unit kind. It -- includes values for subunits that exist in The_Context as -- well as values for subunits that do not exist, but whose name can be -- deduced from the body stub and the name of the parent unit. These -- nonexistent units are known to be library_unit_body elements so their unit -- kind is A_Nonexistent_Body. -- -- Subunit lists are also available through the Semantic_Dependence_Order -- query using the Family relation. -- -- Raises ASIS_Inappropriate_Compilation_Unit if the unit is a -- Nil_Compilation_Unit. -- -- If a subunit is absent or if it is inconsistent with the argument Element, -- A_Nonexistent_Body shall be returned for it. -- -- Returns Unit_Kinds: -- A_Procedure_Body -- A_Function_Body -- A_Package_Body -- A_Procedure_Body_Subunit -- A_Function_Body_Subunit -- A_Package_Body_Subunit -- A_Task_Body_Subunit -- A_Protected_Body_Subunit ------------------------------------------------------------------------------- !resolution Accept. Remove A_Procedure_Body, A_Function_Body, and A_Package_Body from the "Returns Unit_Kinds" list. Add A_Nonexistent_Body to that list.