!ASIS Issue #055 !topic Remove Enclosing_Generic !reference ASIS 95-13.37 !from Sergey Rybin 97-03-06 !keywords Enclosing_Generic !discussion ASIS contains the following query in Asis.Elements: ------------------------------------------------------------------------------ -- Section 13.37 function Enclosing_Generic ------------------------------------------------------------------------------ function Enclosing_Generic (Element : Asis.Element) return Asis.Element; ------------------------------------------------------------------------------ -- Element - Specifies an Element that may be part of a generic declaration -- or the body of a generic declaration -- -- Returns the generic declaration, or the generic body declaration, that -- encloses the given Element. -- -- Returns a Nil_Element if the Element is not part of any generic declaration -- or body. -- -- Raises Asis_Inappropriate_Element when given a Nil_Element. -- ------------------------------------------------------------------------------ The question is - do we really need this query? First, it looks like secondary: it may be implemented as applying Enclosing_Element and checking if the result is a program unit, and when the program unit finally is reached, the last check is if this unit is a generic unit (spec or body). Second, it does not look as very useful for applications. It is specific for generics only. It might make sense to get for a given element the enclosing program unit or the enclosing declarative region, but why is it limited to generics only? Another useful capability might be to get for Is_Part_Of_Instance Element the corresponding instantiation, but this is not what this query does. I would suggest to remove this query at all. !resolution Accepted. !date 97-03-26 !Notes Enclosing_Generic has been removed. All following subclauses in Clause 13 were renumbered accordingly. Changes were made in ASIS version 2.0.M.