Generics: What's a “CONSTRUCTOR constraint”?
问题 I made a custom TObjectList descendant designed to hold subclasses of a base object class. It looks something like this: interface TMyDataList<T: TBaseDatafile> = class(TObjectList<TBaseDatafile>) public constructor Create; procedure upload(db: TDataSet); end; implementation constructor TMyDataList<T>.Create; begin inherited Create(true); self.Add(T.Create); end; I want each new list to start out with one blank object in it. It's pretty simple, right? But the compiler doesn't like it. It says