I am trying to do somenthing like the following:
type
IExemplo<Generic> = interface
function GetGenerico: Generic;
end;
TClassA<Generic> = class(TComponent, IExemplo<Generic>)
function GetGenerico: Generic; virtual;
function GetInterface: IExemplo<Generic>; virtual;
end;
TClassB = class(TClassA<string>)
function GetGenerico: string; override;
function GetInterface: IExemplo<string>; override;
end;
In other words, I create an interface that has some Generics, a base class to implement the interface, and finally a derived class to implement the base class.
But, in the line
function GetInterface: IExemplo<string>; override;
I am getting a syntax error.
My goal is for TClassB to no longer have the Generic attribute, at this point its type has already been properly set.