var
SomeObject: T1;
begin
SomeObject := T2.Create;
SomeObject.Act; // calls T1.Act
end;
Reintroduce
The reintroduce directive suppresses compiler warnings about hiding previously declared virtual methods. For
example,
procedure DoSomething; reintroduce; // the ancestor class also
has a DoSomething method
Use reintroduce when you want to hide an inherited virtual method with a new one.
Dostları ilə paylaş: