Access to Base Class

An expression for base class access is determined as follows:

base-access:

Inherited   identifier

A base access expression is used to access base class members that are hidden by similarly named members in the current class or structure.

At compile time, a base access expression of the Inherited I form is calculated exactly as if it was written (Self as B).I, where B is a base class. Thus, the Inherited I structure corresponds to the Self.I, except an instance of the base class is viewed as Self.

When the base class expression addresses the virtual function member, the process of determination of the invoked method is changed during execution.

NOTE. In instance constructors, the Inherited keyword can only be used to invoke the base class constructor in the header.

See also:

Primary Expressions