Am 27.04.2015 23:27 schrieb "Michael Ring" <[email protected]>:
>
> I now officially feel stupid, this now works with the ; in place, I could
have sworn that I have tried this......
>
> But two lines deeper I end up with a new problem now:
>
>   TSpecialFunctionRegisterComparer =
class(TComparer<TSpecialFunctionRegister>)
>     function Compare(constref Left, Right: TSpecialFunctionRegister):
Integer; override;
>   end;
>
> Error: class type expected, but got "TComparer"
> Fatal: class type expected, but got "TComparer"
>
> Is this a similar problem?
>
> If yes then I guess I will need to stay with -Mdelphi the specialize
syntax is not availabe in delphi mode (identifier not found "specialize")
and the generics library where TComparer comes from explicitly sets delphi
mode.

In mode ObjFPC you must use "specialize" when you want to specialize a
class, this includes the declaration of the class parent.
Also mixing generics from different modes makes no difference, the compiler
supports that.

Regards,
Sven
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to