Next: , Previous: , Up: Implementation Defined Pragmas   [Contents][Index]


2.183 Pragma Type_Invariant_Class

Syntax:

pragma Type_Invariant_Class
  ([Entity =>] type_LOCAL_NAME,
   [Check  =>] EXPRESSION);

The Type_Invariant_Class pragma is intended to be an exact replacement for the language-defined Type_Invariant'Class aspect, and shares its restrictions and semantics.

Note: This pragma is called Type_Invariant_Class rather than Type_Invariant'Class because the latter would not be strictly conforming to the allowed syntax for pragmas. The motivation for providing pragmas equivalent to the aspects is to allow a program to be written using the pragmas, and then compiled if necessary using an Ada compiler that does not recognize the pragmas or aspects, but is prepared to ignore the pragmas. The assertion policy that controls this pragma is Type_Invariant'Class, not Type_Invariant_Class.