Version 1.2 of ai05s/ai05-0217-1.txt

Unformatted version of ai05s/ai05-0217-1.txt version 1.2
Other versions for file ai05s/ai05-0217-1.txt

!standard 7.5(8.2/3)          10-08-12 AI05-0217-1/02
!class binding interpretation 10-06-13
!status Amendment 2012 10-08-12
!status ARG Approved 10-0-0 10-06-19
!status work item 10-06-13
!status received 10-05-18
!priority Low
!difficulty Easy
!qualifier Omission
!subject Record extensions and "immutably limited"
!summary
limited record extensions are "immutably limited".
!question
A record extension is not a record type. Therefore, the following is not "immutably limited":
type I is limited interface; type Rec is limited new I with record <components> end record;
This seems wrong.
!recommendation
(See Summary.)
!wording
Add after the first bullet in the wording added by AI05-0052-1 after 7.5(8):
* A record extension with the reserved word limited;
!discussion
3.2(4) makes it clear that record extensions and record types are separate categories of composite types. This is bizarre, but it is clearly beyond changing at this point.
The example in the question should be "immutably limited" as it would be immutably limited if it wasn't derived from I. Adding a progenitor shouldn't change properties unless absolutely necessary.
Therefore, we add a bullet to include the example in the question into "immutably limited".
!corrigendum 7.5(8)
Insert after the paragraph:
There are no predefined equality operators for a limited type.
the new paragraphs:
A type is immutably limited if it is one of the following:
[Partial text to force a conflict, real text in conflict file.]
!ACATS Test
Add a B-Test to check that this type is classified as "immutably limited".
!appendix

!topic Record extensions and "immutably limited"
!reference 7.5(8.1-8.5)
!from Adam Beneschan 10-05-18
!discussion

I'm assuming a record extension is not a record type.  Nothing that I can find
in 3.9 or 3.9.1 says that it is, and there are places (3.2(4), 4.3.1(14), e.g.)
that seem to assume that it is not.

If that's the case, then I think there's something missing from the definition
of "immutably limited":

   type I is limited interface;
   type Rec is limited new I with record
      <components>
   end record;

I don't see any reason why this shouldn't be immutably limited.
Obviously, it would be immutably limited if it were a record type not derived
from anything, and adding a limited interface progenitor shouldn't change that.

However, nothing in the definition of "immutably limited" covers this case.
7.5(8.2) doesn't apply because it's not a record type, assuming that a record
extension is not a record type.  7.5(8.3-8.4) obviously don't apply here, and
7.5(8.5) doesn't apply because it's derived only from interface types, which
aren't immutably limited.

So I think this is an error; perhaps 7.5(8.2) needs to say "an explicitly
limited record type or record extension", but I don't know whether there are any
other details that need to be considered.

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

From: Randy Brukardt
Sent: Thursday, May 20, 2010  7:19 PM

Looks like a bug to me. The intent is that all non-interface non-formal limited
tagged types are covered, and that is clearly not true.

But "explicitly limited record" is a particular kind of thing (see 3.8(13.1/3)),
it doesn't apply to extensions. So we just can't drop extensions into it.

So I'd suggest adding another bullet (probably after the first):

* A record extension with the reserved word limited;

Note that one could imagine a similar change for untagged derived types
containing the reserved word limited (they cannot become non-limited), but that
would be weird as the parent type *could* become non-limited. We don't need to
go there, so lets not.

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

Questions? Ask the ACAA Technical Agent