Composite types (GNAT Reference Manual) (original) (raw)
17.3.8.3 Composite types ¶
When a finalized type is used as a component of a composite type, the latter becomes finalized as well. The three primitives are derived automatically in order to call the primitives of their components.
If that composite type was already user-finalized, then the compiler calls the primitives of the components so as to stay consistent with today’s controlled types’s behavior.
So, Initialize
and Adjust
are called on components before they are called on the composite object, but Finalize
is called on the composite object first.