Is it possible to constrain the type of generic to, say, two different classes?
Like so:
TSomeClass<T: FirstClass; T: SecondClass> = class
// ...
end;
(Sorry about the lack of formatting - the SO tool bar has disappeared from my browser). I know the above won't compile, its only written so to give you guys an idea. I tried
TSomeClass<T: FirstClass, SecondClass> = class
// ...
end;
but then I wasn't allowed to write
procedure TSomeClass.SomeMethod<T> (Param1: string);
Is this even possible?