!ASIS Issue #088 !topic Nil_Element as Corresponding_Expression_Type !reference ASIS 95-17.1 !from Sergey Rybin 98-01-14 !keywords Nil_Element Corresponding_Expression_Type expression type !discussion There are additional situations where Nil_Element should be returned by Corresponding_Expression_Type. Nil_Element should be returned for an enumeration_aggregate which is part of enumeration_representation_clause. There may be other kinds of expressions where Nil_Element should be returned. A general rule should be provided in the ASIS specification for the return of Nil_Element in the case when an Expression actually does not represent an Ada expression having an Ada type. I would only point out some important cases when Nil_Element should be returned, without caring too much about the completeness of this list, and without pretending to provide the complete list. !resolution Accept !date 98-03-26 !Notes Replace the following from Clause 17.1: -- Returns a Nil_Element for the following classes of expressions that do not -- have a Corresponding_Expression_Type: -- -- - Naming expressions that name packages, subprograms, tasks, etc. These -- expressions do have a Corresponding_Name_Definition and a -- Corresponding_Name_Declaration. -- -- - When An_Identifier Element representing an attribute designator is passed -- as the actual to this query. -- -- - The Actual_Parameter Expression from A_Pragma_Argument_Association for a -- Pragma may or may not have a Corresponding_Expression_Type. If the -- returned declaration is non-nil then the Expression is either: -- -- a) an ordinary expression, or -- b) a naming expression that names a constant or variable object. -- -- Returns a Nil_Element, if statically determinable type of Expression is a -- class-wide type. with: -- Returns a Nil_Element if the argument Expression does not represent an Ada -- expression having an Ada type, including the following classes: -- -- - Naming expressions that name packages, subprograms, tasks, etc. These -- expressions do have a Corresponding_Name_Definition and a -- Corresponding_Name_Declaration. -- -- - When An_Identifier Element representing an attribute designator is passed -- as the actual to this query. -- -- - The Actual_Parameter Expression from A_Pragma_Argument_Association for a -- Pragma may or may not have a Corresponding_Expression_Type. -- -- - An_Attribute_Reference Element also may or may not have a -- Corresponding_Expression_Type; -- -- - An enumeration_aggregate which is a part of -- enumeration_representation_clause. -- -- Returns a Nil_Element, if statically determinable type of Expression is a -- class-wide type. Note: See Comment 103 which adds text to the first bullet above.