CVS difference for ai05s/ai05-0131-1.txt
--- ai05s/ai05-0131-1.txt 2011/02/08 08:21:05 1.3
+++ ai05s/ai05-0131-1.txt 2011/03/12 07:07:54 1.4
@@ -1,5 +1,7 @@
-!standard 12.6(10) 11-02-04 AI05-0131-1/02
+!standard 12.6(10) 11-03-11 AI05-0131-1/03
!class binding interpretation 08-12-04
+!status Amendment 2012 11-03-11
+!status ARG Approved 7-0-1 10-02-20
!status work item 08-12-04
!status received 08-10-23
!priority Low
@@ -106,7 +108,7 @@
package Inst2 is new Pack2.Gen_Pack (Pack1.Root'Class); -- ERROR:
package Inst3 is new Pack2.Gen_Pack (Pack1.Root, Pack1.Oper_1); -- OK
package Inst4 is new Pack2.Gen_Pack (Pack1.Root'Class,
- Pack1.Oper_1); -- ERROR:
+ Pack1.Oper_1); -- !!
use Pack1;
package Inst5 is new Pack2.Gen_Pack (Pack1.Root); -- OK
package Inst6 is new Pack2.Gen_Pack (Pack1.Root'Class); -- OK
@@ -119,10 +121,10 @@
But if you want to explicitly give the subprogram (perhaps because the use
clause drags in lots of other conflicting names), Inst3 is legal (of course),
-but Inst4 is not.
+but Inst4 is not (without the changes of this AI).
Ada almost always allows using selected notation rather than use visibility
-(it even goes so far as to provide selection notation for operators!), but
+(it even goes so far as to provide selected notation for operators!), but
that is not the case here. That seems to be a mistake.
----
@@ -133,18 +135,18 @@
routines.
For instance, consider the following case where the instance would have been
-legal without AI05-0071:
+legal without AI05-0071-1:
package Pkg1 is
type T1 is tagged null record;
- procedure Foo (X1 ; T1);
+ procedure Foo (X1 : T1);
generic
type T2 (<>) is private;
with procedure Foo (X2 : T2) is <>;
package G is
end G;
- end Pkg;
+ end Pkg1;
with Pkg1;
package Pkg2 is
@@ -182,8 +184,9 @@
"potentially use-visible".
This is the only part of the wording changes that is motivated by this
-"homograph collision" problem. The rest of the wording changes are motivated by
-the problem that this AI was originally created to address.
+"homograph collision" problem (along with the related 8.4 changes). The
+rest of the wording changes are motivated by the problem that this AI was
+originally created to address.
It seems odd to introduce the possibility of a "potentially use-visible"
declaration in a program which does not contain the reserved word "use"
@@ -192,14 +195,14 @@
----
-The original example which motivated AI05-0071 remains legal, but now this is
+The original example which motivated AI05-0071-1 remains legal, but now this is
handled via the equivalence stated in the one sentence of 12.6(10) that has
remained constant throughout all of these changes (listed above), as opposed to
via an only-for-defaulted-parameters rule.
-Note that this proposal follows AI05-0071 in building implicit declarations only
+Note that this proposal follows AI05-0071-1 in building implicit declarations only
for primitive subprograms which have at least one controlling formal parameter
-(as opposed to only a controlling result), AI05-0071 got this part right -
+(as opposed to only a controlling result), AI05-0071-1 got this part right -
building on 12.5.1(23.3/2)'s weirdness seems like a bad idea. With at least one
controlling operand, we have a nice clean wrapper model. When we only have a
controlling result, things get messy.
Questions? Ask the ACAA Technical Agent