Open pat-rogers opened 3 years ago
I believe the first part is referring to 24.l.1/4 rather than 21.1.l/4. I would suggest: Modify 4.6(24.l.1/4):
Discussion: {AI12-0095-1} We assume the worst in a generic body {about} whether or not a formal subtype has a constrained partial view; specifically, in a generic body a discriminated subtype is considered to have a constrained partial view if it is a descendant of an untagged generic formal private or derived type (see 12.5.1 for the formal definition of this rule).
Regarding 24.17/4, Randy writes:
I'm dubious, it's not much shorter, and it is confusing since the "In addition" part is adding to nothing (since the "statically deeper" rules don't apply in this case, the main Legality Rule doesn't apply at all). It's also unchanged Ada 2005 wording (the change was deleting generic boilerplate from this paragraph as it was generalized to cover the entire subclause), so it's probably out of bounds anyway as an "improvement".
The Proof as added when I first suggested it, and The Proof itself is the "pointer to this paragraph" -- we don't generally include such things in Redundant text. It's also Ada 2012 wording (only the paragraph number was changed by the Corrigendum), so "improving" it is out of bounds anyway.
I guess I tend to agree with Randy, since the fact that the statically deeper relationship doesn't apply is not going to be blatantly obvious to someone reading this section, and when the statically deeper relationship doesn't apply between X and Y, it is not blatantly obvious how to understand a rule like "X shall not be statically deeper than Y." So I believe the "unless" part is clarifying.
Added the AARM note update to the AARM AI (AI12-0005-1).
As for the rest of it, marked it No Action. (I marked the entire comment that, but the AARM note was handled; it's just the more important comment was ignored).
In 21.1.l/4 we've got "We assume the worst in a generic body whether or not a formal subtype has a constrained partial view; specifically, ... "
Should a word like "regarding" or "about" be inserted, as in "We assume the worst about whether ..." ?
In 24.17/4, we've got "The accessibility level of the operand type shall not be statically deeper than that of the target type, unless the target type is an anonymous access type of a stand-alone object." It seems like the comma and everything after can be deleted from that sentence, since 3.10.2 says that the statically deeper relationship never applies to "the type of a stand-alone object of an anonymous access-to-object type". But Randy points out that this would break the next sentence, which implicitly refers to that "unless" clause. So we need The accessibility level of the operand type shall not be statically deeper than that of the target type. In addition, if the target type is an anonymous access type of a stand-alone object, the accessibility level of the operand type shall not be statically deeper than that of the declaration of the stand-alone object. Randy and Tuck also noted that we have some RM text that is marked (correctly) as redundant, but the reason that it is redundant is not completely obvious and would benefit from some RM pointers: 1) There should be a Proof after 3.10.2(13.3/4) pointing at 4.6, something like "We have a stricter accessibility rule for conversions into such an access type in 4.6." 2) It would be helpful to have a pointer to [the paragraph we are discussing above] from the part of 3.10.2(13.3/4) marked as redundant.
SteveB