Oops...
2014-02-26 12:16 GMT-03:00 silvioprog <[email protected]>:
[...]
> I tried that but:
>
> "Identifier not found "TMyGenericClass"".
>
Full test below:
generic TMyGeneric<T> = class
public type
TMyGenericClass = class of TMyGeneric;
end;
TMyService = class
public
class procedure RegisterItem(aItemClass: TMyGeneric.TMyGenericClass);
end;
TMyClass = class(specialize TMyGeneric<TObject>)
end;
..
begin
TMyService.RegisterItem(TMyClass);
end;
Error: Incompatible type for arg no. 1: Got "Class Of TMyClass", expected
"TMyGeneric.TMyGenericClass"
The only alternative is use "class procedure RegisterItem(aItemClass:
TClass);" instead of "class procedure RegisterItem(aItemClass:
*MyGenericType*);"?
--
Silvio Clécio
My public projects - github.com/silvioprog
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal