J.11 The Class Attribute of Untagged Incomplete Types
danger
This Reference Manual output has not been verified, and may contain omissions or errors. Report any problems on the tracking issue
Static Semantics
1/2For the first subtype S of a type T declared by an incomplete_type_declaration
that is not tagged, the following attribute is defined:
S'Class
- Denotes the first subtype of the incomplete class-wide type rooted at T. The completion of T shall declare a tagged type. Such an attribute reference shall occur in the same library unit as the
incomplete_type_declaration
.
2.a/2
reason
This must occur in the same unit to prevent children from imposing requirements on their ancestor library units for deferred incomplete types.
Wording Changes from Ada 95
2.b/3
This subclause is new. This feature was moved here because the tagged incomplete type provides a better way to provide this capability (it doesn't put requirements on the completion based on uses that could be anywhere). Pity we didn't think of it in 1994.