Version 1.3 of ai12s/ai12-0275-1.txt

Unformatted version of ai12s/ai12-0275-1.txt version 1.3
Other versions for file ai12s/ai12-0275-1.txt

!standard 8.5.1(2/3)          18-06-14 AI12-0275-1/01
!class Amendment 18-05-10
!status work item 18-05-10
!status received 17-10-15
!priority Low
!difficulty Easy
!subject Make subtype_mark optional in object renames
!summary
subtype_mark in object renaming declarations is made optional, and can be skipped when there is no ambiguity with regards to the type of the renamed expression.
!problem
subtype_marks are often redundant, especially when used to introduce local renamings that are aimed at clarifying the intent of the code.
!proposal
Make the subtype_mark optional in object renaming declarations. The expression will be correctly typed as long as the right hand expression's can be non ambiguously resolved to only one specific type.
!wording
Modify 8.5.1(2/3) as follows:
2/3 object_renaming_declaration ::=
defining_identifier [: [null_exclusion] subtype_mark] renames object_name
[aspect_specification];
| defining_identifier : access_definition renames object_name
[aspect_specification];
Modify 8.5.1(3/2) as follows:
3/2 The type of the object_name shall resolve to the type determined by the subtype_mark, if present. If no subtype_mark is present, the type of the object_name shall resolve to exactly one type.
In the case where the type is defined by an access_definition, the type of the object_name shall resolve to an anonymous access type. If the anonymous access type is an access-to-object type, the type of the object_name shall have the same designated type as that of the access_definition. If the anonymous access type is an access-to-subprogram type, the type of the object_name shall have a designated profile that is type conformant with that of the access_definition.
!discussion
Probably one doesn't want to make the access_definition optional; it's a new type and we don't want to be declaring types implicitly.
!ASIS
[Not sure. It might be necessary to remove/make optional access to the subtype name of a renaming. - Editor.]
!ACATS test
ACATS B- and C-Tests are needed to check that the new capability is supported.
!appendix

From: RaphaŽl Amiard
Sent: Friday, June 15, 3:21 AM

Here is my homework for AI12-0275 [This is version /01 of the AI - Editor.]

****************************************************************

From: RaphaŽl Amiard
Sent: Friday, June 15, 3:21 AM

Here is my homework for AI12-0275 [This is version /01 of the AI - Editor.]

****************************************************************

From: RaphaŽl Amiard
Sent: Friday, June 15, 3:21 AM

Here is my homework for AI12-0275 [This is version /01 of the AI - Editor.]

****************************************************************



Questions? Ask the ACAA Technical Agent