CVS difference for ai12s/ai12-0127-1.txt

Differences between 1.14 and version 1.15
Log of other versions for file ai12s/ai12-0127-1.txt

--- ai12s/ai12-0127-1.txt	2017/11/22 03:49:57	1.14
+++ ai12s/ai12-0127-1.txt	2017/11/22 03:59:04	1.15
@@ -1,4 +1,4 @@
-!standard 4.3(2)                                    17-10-13    AI12-0127-1/08
+!standard 4.3(2)                                    17-10-14    AI12-0127-1/09
 !standard 4.3(4)
 !standard 4.3.3(3)
 !standard 4.3.4(0)
@@ -73,6 +73,13 @@
                 array_aggregate     |
                 delta_aggregate
 
+Delete 4.3(3)
+
+   The expected type for an aggregate shall be a single array type,
+   record type, or record extension.
+
+[This deletes the name resolution rule that is common to all forms of aggregates]
+
 Replace 4.3(4):
   An aggregate shall not be of a class-wide type.
 
@@ -80,6 +87,16 @@
   A record aggregate or extension aggregate shall not be of a class-wide
   type.
 
+Replace 4.3.1(3)
+
+   The expected type for a record_aggregate shall be a single record type or
+   record extension.
+
+with
+
+   The expected type for a record aggregate shall be a single array type,
+   record type, or record extension.
+
 Add after 4.3.1(9):
 
   Each selector_name in a record_component_association of a
@@ -92,6 +109,49 @@
 Rules to prevent giving the same component twice ("distinct" below) and 
 giving components from two variants.]
 
+Add a new legality rule (at the start of the legality rules section,
+ahead of 4.3.1(14))
+
+   The type of a record_aggregate shall be a record type or
+   record extension.
+
+Replace 4.3.2(4/2)
+
+   The expected type for an extension_aggregate shall be a single type
+   that is a record extension. If the ancestor_part is an expression,
+   it is expected to be of any tagged type.
+
+with
+
+   The expected type for an extension_aggregate shall be a single array
+   type, record type, or record extension.  If the ancestor_part is an
+   expression, it is expected to be of any tagged type.
+
+Add a new legality rule (at the start of the legality rules section,
+ahead of 4.3.2(5/3))
+
+   The type of an extension_aggregate shall be a record extension.
+
+Replace 4.3.3(7/2)
+
+   The expected type for an array_aggregate (that is not a subaggregate)
+   shall be a single array type. The component type of this array type is
+   the expected type for each array component expression of the
+   array_aggregate.
+
+with
+
+   The expected type for an array_aggregate (that is not a subaggregate)
+   shall be a single array type, record type, or record_extension. The
+   component type of this array type is the expected type for each array
+   component expression of the array_aggregate.
+
+Add a new legality rule (at the start of the legality rules section,
+ahead of 4.3.3(9))
+
+   The type of an array_aggregate that is not a subaggregate shall
+   be an array type.
+
 Replace 4.3.3(3):
   named_array_aggregate ::=
     (array_component_association {, array_component_association})
@@ -141,11 +201,8 @@
 
 Name Resolution Rules
 
-The expected type for a record_delta_aggregate shall be a single descendant
-of a record type.
-
-The expected type for an array_delta_aggregate shall be a single array
-type.
+The expected type for a delta_aggregate shall be a single array
+type or a single descendant of a record type or of a record extension.
 
 The expected type for the *base_*expression of any delta_aggregate is
 the type of the enclosing delta_aggregate.
@@ -166,6 +223,11 @@
 
 Legality Rules
 
+The type of a record_delta_aggregate shall be a descendant of a
+record type or of a record_extension.
+
+The type of an array_delta_aggregate shall be an array type.
+
 For a record_delta_aggregate, a record_component_association_list
 shall not be null record. A record_component_association of the
 record_component_association_list of a record_delta_aggregate
@@ -1951,6 +2013,121 @@
 > within different variants of the same variant part.
 
 Sounds good.
+
+****************************************************************
+
+From: Steve Baird
+Sent: Saturday, October 14, 2017  10:47 AM
+
+The intent here is to avoid changing the language rules in any way for
+non-delta aggregates. The problem is that 4.3(3) does not do what what we want
+for delta aggregates and it applies to all forms of aggregates.
+So we get rid of that and distribute the effect of that rule over each of the
+forms of aggregates, hopefully preserving the existing semantics.
+
+The straightforward way to do this would result in name resolution rules which
+look ridiculous/confusing when appearing side by side, as in
+
+   The expected type for a record aggregate shall be a single array type,
+   record type, or record extension.
+   The expected type for a record_aggregate shall be a single record type
+   or record extension.
+
+In cases like this, we replace the more specific rule with a legality rule.
+This is intended to only be a change in presentation, having no effect on the
+language definition for aggregates other than delta aggregates.
+
+[This is version /09 of the AI.]
+
+---------------------
+
+Delete 4.3(3)
+
+   The expected type for an aggregate shall be a single array type,
+   record type, or record extension.
+
+[This deletes the name resolution rule that is common to all forms of aggregates]
+
+====
+
+Replace 4.3.1(3)
+
+   The expected type for a record_aggregate shall be a single record type or
+   record extension.
+
+with
+
+   The expected type for a record aggregate shall be a single array type,
+   record type, or record extension.
+
+And then add a new legality rule (at the start of the legality rules section,
+ahead of 4.3.1(14))
+
+   The type of a record_aggregate shall be a record type or
+   record extension.
+
+====
+
+Replace 4.3.2(4/2)
+
+   The expected type for an extension_aggregate shall be a single type
+   that is a record extension. If the ancestor_part is an expression,
+   it is expected to be of any tagged type.
+
+with
+
+   The expected type for an extension_aggregate shall be a single array
+   type, record type, or record extension.  If the ancestor_part is an
+   expression, it is expected to be of any tagged type.
+
+And then add a new legality rule (at the start of the legality rules section,
+ahead of 4.3.2(5/3))
+
+   The type of an extension_aggregate shall be a record extension.
+
+====
+
+Replace 4.3.3(7/2)
+
+   The expected type for an array_aggregate (that is not a subaggregate)
+   shall be a single array type. The component type of this array type is
+   the expected type for each array component expression of the
+   array_aggregate.
+
+with
+
+   The expected type for an array_aggregate (that is not a subaggregate)
+   shall be a single array type, record type, or record_extension. The
+   component type of this array type is the expected type for each array
+   component expression of the array_aggregate.
+
+And then add a new legality rule (at the start of the legality rules section,
+ahead of 4.3.3(9))
+
+   The type of an array_aggregate that is not a subaggregate shall
+   be an array type.
+
+====
+
+In the proposed wording for delta aggregates, replace the name resolution rules
+
+   The expected type for a record_delta_aggregate shall be a single
+   record type or record extension.
+
+   The expected type for an array_delta_aggregate shall be a single
+   array type.
+
+with
+
+   The expected type for an extension_aggregate shall be a single array
+   type or a single descendant of a record type or of a record extension.
+
+And then add new legality rules (at the start of the legality rules section)
+
+   The type of a record_delta_aggregate shall be a descendant of a
+   record type or of a record_extension.
+
+   The type of an array_delta_aggregate shall be an array type.
 
 ****************************************************************
 

Questions? Ask the ACAA Technical Agent