[fpc-devel] Generic List in Advanded record does not compile with -MobjFPC, works with -MDelphi (perhaps related to Generics.Collections that I am using)
pascaldragon at googlemail.com
Tue Apr 28 08:14:32 CEST 2015
Am 27.04.2015 23:27 schrieb "Michael Ring" <mail at michael-ring.org>:
> 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 =
> function Compare(constref Left, Right: TSpecialFunctionRegister):
> 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
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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-devel