CVS difference for ai05s/ai05-0020-1.txt
--- ai05s/ai05-0020-1.txt 2006/11/11 07:07:45 1.1
+++ ai05s/ai05-0020-1.txt 2006/12/16 03:13:18 1.2
@@ -1,21 +1,28 @@
-!standard 4.5.2(9.3/2) 06-11-10 AI05-0020-1/01
+!standard 4.5.2(9.3/2) 06-12-13 AI05-0020-1/02
!standard 4.5.5(19.2/2)
!class binding interpretation 06-11-10
+!status ARG Approved 9-0-2 06-11-18
!status work item 06-11-10
!status received 06-08-26
!priority Medium
!difficulty Easy
!qualifier Omission
-!subject Operators of Partial views of fixed point and access types are considered
+!subject Universal operators of fixed point and access types
!summary
+Operators of partial views of fixed point types are considered when determining
+if the predefined universal_fixed operators can be used. Similarly, if equality
+is defined for an anonymous access type with a designated type of a partial or
+incomplete view, then that equality operator is considered when determining if
+the predefined universal_access operator can be used.
+
Operators of partial views of fixed point and access types (if any) are considered
when determining if the predefined universal_fixed and universal_access operators
can be used.
!question
-The rules in 4.5.2(19.1-19.4/2) specify when the universal_access "=" operator
+The rules in 4.5.2(9.1-9.4/2) specify when the universal_access "=" operator
can be used. These rules have rather counter-intuitive consequences.
Consider the example:
@@ -28,7 +35,7 @@
end P;
For clients of P, which see the partial view of T, the presence of the
-user-defined "=" in the visible part has to the effect of eliminating the
+user-defined "=" in the visible part has the effect of eliminating the
"=" for universal_access during overload resolution, and therefore
equality among values of "access T" unambiguously use P."=" (assuming it's
visible). Fine, this is presumably what the author of the package
@@ -56,8 +63,8 @@
!wording
Modify 4.5.2(9.3/2) to:
- * it is declared immediately within the same declaration list as D or
- any partial view of D; and
+ * it is declared immediately within the same declaration list as D{ or
+ any partial or incomplete view of D}; and
Modify 4.5.5(19.2/2) to:
@@ -70,13 +77,25 @@
just an oversight of the original wording, probably because completing private
types with a fixed point type isn't very common.
+For "=", the problem can also occur for incomplete types:
+
+ type Incomp;
+ function "=" (Left, Right : access Incomp);
+
+This is perfectly fine, and we don't want the completion to act differently just
+because there is an incomplete view.
+
+This latter case can't happen for fixed-point types, because use of an untagged
+incomplete type as a non-access parameter is prohibited:
+ function "*" (Left, Right : Incomp); -- Illegal!
+
!corrigendum 4.5.2(9.3/2)
@drepl
@xbullet<it is declared immediately within the same declaration list as @i<D>; and>
@dby
@xbullet<it is declared immediately within the same declaration list as @i<D> or
-any partial view of @i<D>; and>
+any partial or incomplete view of @i<D>; and>
!corrigendum 4.5.5(19.2/2)
@@ -92,7 +111,7 @@
!appendix
-From: Pascal Leory
+From: Pascal Leroy
Date: Saturday, August 26, 2006 4:46 AM
The Amendment defines (in AI 364 and AI 420) new name resolution rules
Questions? Ask the ACAA Technical Agent