!editorial comment 121 !topic Corresponding_Type_Operators parameter is a formal type definition !reference ASIS 95-16.1 !from Gary Barnes 98-10-29 Since generic formal types also define implicit operators (eg. "+") shouldn't this interface be described as also being able to accept A_Formal_Type_Definition? Updated Text: function Corresponding_Type_Operators (Type_Definition : in Asis.Type_Definition) return Asis.Declaration_List; ------------------------------------------------------------------------------ -- Type_Definition - Specifies the type to query -- -- Returns a list of operators. These include all predefined operators, and -- all user-defined operator overloads, that have been implicitly or -- explicitly declared for the type. (Reference Manual 7.3.1(2)) -- -- This list includes only operators appropriate for the type, from the set: -- and or xor = /= < <= > >= + - & * / mod rem ** abs not -- -- Returns a Nil_Element_List if there are no predefined or overloaded -- operators for the type. -- -- Returns a Nil_Element_List if the implementation does not provide -- such implicit declarations. -- -- The Enclosing_Element for each implicit declaration is the declaration (type -- or object) that declared the type. -- -- For limited private types, if a user-defined equality operator has -- been defined, an Ada implementation has two choices when dealing with an -- instance of the "/=" operator. a) treat A/=B as NOT(A=B), b) implicitly -- create a "/=" operator. Implementations that take the second alternative -- will include this implicit inequality operation in their result. -- Implementations that choose the first alternative are encouraged to hide -- this choice beneath the ASIS interface and to "fake" an inequality -- operation. Failing that, the function call, representing the NOT -- operation, must have Is_Part_Of_Implicit = True so that an ASIS application -- can tell the difference between a user-specified NOT(A=B) and an -- implementation-specific A/=B transformation. -- -- Appropriate Definition_Kinds: -- A_Type_Definition -- A_Formal_Type_Definition ; forgotten by the standard -- -- Returns Declaration_Kinds: -- A_Function_Declaration -- A_Function_Body_Declaration -- A_Function_Body_Stub -- A_Function_Renaming_Declaration -- A_Function_Instantiation -- A_Formal_Function_Declaration -- --|IP Implementation Permissions: --|IP --|IP The result may or may not include language defined operators that have --|IP been overridden by user-defined overloads. Operators that are totally --|IP hidden, in all contexts, by user-defined operators may be omitted from --|IP the list. --|IP --|IP Some implementations do not represent all forms of implicit --|IP declarations such that elements representing them can be easily --|IP provided. An implementation can choose whether or not to construct --|IP and provide artificial declarations for implicitly declared elements. ------------------------------------------------------------------------------ !resolution Accept. Add A_Formal_Type_Definition to the list of Appropriate Definition_Kinds.