!ASIS Issue #099 !topic A_Formal_Package_Declaration as an appropriate argument for Corresponding_Declaration !reference ASIS 95-15.26, 15.27 !from Sergey Rybin 98-10-03 !keywords !discussion Consider the following example: generic package Genpack is function F return Integer; end Genpack; package body Genpack is function F return Integer is begin return 0; end F; end Genpack; with Genpack; Generic with package P is new Genpack; --<<--- (2) package Genpack2 is function F return Integer; end Genpack2; package body Genpack2 is function F return Integer is begin return P.F; -- <<--- (1) end F; end Genpack2; Consider the function call P.F at point (1). There is no formal reason for Corresponding_Called_Function to return Nil_Element for it. But what happens if we apply Enclosing_Element to the result of Corresponding_Called_Function? What happens if we apply it several times? There is nothing in the ASIS which could help to answer this question. The most logical solution would probably be to consider the function declaration which should be returned in this case as belonging to the expanded geclaration of the generic package Genpack at point (2), but the problem is, that this expanded generic spec would correspond to a formal package declaration, but not to a package instantiation. In the same time, Asis.Declarations.Corresponding declaration can be applied to a package instantiation (and it will return an expanded spec in this case), but it cannot be applied to a formal package declaration (which in fact is also some kind of package instantiation). It looks like formal packages as appropriate arguments for Corresponding_Name_Declarations were missed when ASIS 83 was evolved to ASIS 95. !resolution Rejected. Issue already submitted to ASIS-technical by Alain Le Guennec as Issue #086.