Just create an inheritance scheme for both list objects and you will clearly see why InheritsFrom is not working. At Generics.Collections, we have:
TEnumerable<T> = class abstract;
TList<T> = class(TEnumerable<T>);
TObjectList<T> = class(TList<T>);
In your example, we have:
TMyObject = class;
TMyDerivedObject = class(TMyObject);
So, we get these two inheritance trees:
TObject
|
TEnumerable<TMyDerivedObject>
|
TList<TMyDerivedObject>
|
TObjectList<TMyDerivedObject>
and then we have:
TObject
|
TEnumerable<TMyObject>
|
TList<TMyObject>
|
TObjectList<TMyObject>
, TObject!