CVS difference for ais/ai-00377.txt

Differences between 1.1 and version 1.2
Log of other versions for file ais/ai-00377.txt

--- ais/ai-00377.txt	2004/04/21 00:31:56	1.1
+++ ais/ai-00377.txt	2004/08/31 23:06:43	1.2
@@ -1,5 +1,6 @@
-!standard 08.03(26/1)                                 04-04-20  AI95-00377/00
+!standard 08.03(26/1)                                 04-08-31  AI95-00377/01
 !class binding interpretation 04-04-20
+!status work item 04-08-31
 !status received 04-03-23
 !priority Low
 !difficulty Medium
@@ -7,17 +8,81 @@
 
 !summary
 
+If a library unit generic and a library unit instance thereof have child
+units with the same name, then the explicitly declared child of the instance
+hides the implicit declaration corresponding to the child of the generic.
+
 !question
 
+If a library unit generic and a library unit instance thereof have child
+units with the same name (see the example), then it would seem that
+the instance declares nonoverloadable homographs. Was this intended? (No.)
+
 !recommendation
 
+(See summary.)
+
 !wording
 
+Append to end of 10.1.1(19):
+
+Furthermore, if the instance is a library package, then this declaration
+is not visible within the scope of a with_clause that mentions a child
+unit of the instance which is a homograph of this declaration.
+
 !discussion
 
---!corrigendum
+This scenario never occurs in practice. The language needs to be well-defined
+and a solution should be chosen which is easy to specify and to implement,
+but users really don't care about this one at all.
+
+We do not want to allow a view of an instance which declares
+non-overloadable homographs (see, for example, the first sentence of
+8.3(26/1)). It seems at least possible that this might requires a bunch of
+special-case visibility rules, and that is reason enough to abandon this
+approach.
+
+Another approach would be to say that neither of the two declarations are
+visible, but the suggested solution seems simpler. In addition, the suggested
+solution is consistent with Ada's notion that in general an explicit
+declaration hides an implicitly declared homograph.
+
+In the wording section, should "is not visible" be replaced with
+"is hidden from all visibility"?
 
 !example
+
+    generic
+    package G1 is
+    end G1;
+
+    generic
+    package G1.G2 is
+    end G1.G2;
+
+    with G1;
+    package I1 is new G1;
+
+    package Some_Package is
+    end Some_Package;
+
+    with Some_Package;
+    package I1.G2 renames Some_Package;
+
+    with G1.G2;
+    with I1.G2;
+    package Q1 renames I1.G2; -- legal? (yes)
+
+    with G1.G2;
+    with I1.G2;
+    package Q2 is new I1.G2; -- legal? (no)
+
+    with G1.G2;
+    with I1.G2;
+    with System;
+    procedure Q3 (X : System.Address := I1.G2'Address);  -- legal? (yes)
+
+--!corrigendum
 
 !ACATS test
 

Questions? Ask the ACAA Technical Agent