Hello,
compile the following class library:
namespace ClassLibrary1;
interface
type
Class1 = public abstract class
assembly
method Load;
begin
Load (Nil)
end;
public
method Load (Data : Object); virtual;
require
assigned (Data);
begin
end;
end;
implementation
end.
Warning:
C:\Temp\ClassLibrary1\ClassLibrary1\Class1.pas(11,14): warning W60: Requirement (assigned(Data)) for method “method Class1.Load(Data: Object)” not met
As the Load (Object) is virtual, it could be overridden in a descending class.
What I would like to test in the base method is that a descending class calling the base method should provide a value.